Baggage
User-defined key-value pairs propagated with the trace:
baggage: user_id=alice,tenant_id=acme
use opentelemetry::baggage::BaggageExt;
use opentelemetry::Context;
let cx = Context::current_with_baggage(vec![
KeyValue::new("user_id", user_id.to_string()),
]);
let user_id = cx.baggage().get("user_id");
Warning: Baggage is visible to all services in the call graph — never put secrets in Baggage.