Metadata
Emby supports attaching custom metadata to your requests using simple HTTP headers.This lets you send contextual information such as:
- Tenant IDs
- User/session identifiers
- Application versions
- Feature flags
- Country / region metadata
- AB-test buckets
- Internal trace IDs
Using Custom Metadata Headers
To add metadata, include any header beginning with:- Emby → Logs
- Emby → Usage Analytics
- Per-request inspector
Best Practices
Use the `X-Emby-` prefix
All metadata headers should start with
Example:
X-Emby-Example:
X-Emby-Tenant-ID.Consistent naming
Use short, descriptive names separated with hyphens:
X-Emby-App-Version,X-Emby-Feature.Avoid sensitive data
Do not include raw PII like email addresses.
Use hashed or anonymized IDs instead.
Use hashed or anonymized IDs instead.
Keep values small
Keep metadata concise to avoid bloated requests, especially for high-volume applications.
Example: Multi-Tenant Platform
Here’s a real-world example for SaaS platforms running multiple tenants:- Tenant
- User
- App version
- Feature or product area
What Metadata Enables
Per-Tenant Monitoring
Track latency, errors, and usage across different customers.
Session & Debug Tracing
Pass trace IDs to connect LLM calls to backend logs.
Feature Analytics
See which features or tools drive the most LLM usage.
Cost Breakdown
Attribute spend per tenant, user, region, or version.
Need Help Designing Metadata Strategy?
If you want help designing:- Tenant-aware billing
- Usage attribution
- AB-test instrumentation
- Observability correlation
- Multi-region tracking
💬 WhatsApp us: https://wa.absolum.nl

