Add the OTel SDK baggage API dependency for your language (e.g., opentelemetry-api for Python, @opentelemetry/api for Node.js)
At the entry point of a request, set baggage entries using the Baggage API: create a Baggage object with key-value pairs such as tenant_id or feature_flag, then set it on the current context using context.with(baggage.setBaggage(...))
Ensure a W3C BaggagePropagator is registered in the SDK's composite propagator alongside the TraceContext propagator; this causes baggage to be serialized into the baggage HTTP header on outbound calls
In downstream services retrieve baggage entries from the incoming context using baggage.getBaggage(context.active()) and use the values to tag spans, filter logs, or make routing decisions
Validate propagation end-to-end by inspecting the HTTP headers on an outbound request (using debug logging or a network proxy) and confirming the baggage header contains the expected key-value pairs
Apply a size limit to baggage entries in middleware or at the gateway; the W3C spec recommends staying under 8192 bytes total for the baggage header to avoid header size limits in HTTP intermediaries
Known gotchas
Baggage is propagated in plaintext HTTP headers and is visible to any intermediary; never place sensitive values such as authentication tokens or PII in baggage entries
The OTel SDK does not automatically add baggage values as span attributes; you must explicitly read baggage and call span.setAttribute() if you want the values to appear in trace data
If any service in the call chain does not register a BaggagePropagator, the baggage header will be dropped at that hop and all downstream services will lose the baggage context — propagator configuration must be consistent across all services
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp