Summary
Add a bounded ContextBaggage — a key/value container carried alongside context/trace, subject to the same limits as the context itself (max key count, max total size) to avoid transport overload.
Goal
Provide an ergonomic, bounded side-channel for auxiliary fields (tenant, region, user tags) without expanding the IContext contract on every new field.
Problem
Ad hoc baggage (e.g. W3C baggage header) has no structure or limits here. Unbounded key/value growth can overload HTTP headers/queue headers, and heavy use risks violating the principle "context is metadata, not state".
Scope
Design Expectations
Acceptance Criteria
Non-Goals
- No business-state usage; the bag is auxiliary metadata only.
- No persistence, retry, or compliance logic.
Summary
Add a bounded
ContextBaggage— a key/value container carried alongside context/trace, subject to the same limits as the context itself (max key count, max total size) to avoid transport overload.Goal
Provide an ergonomic, bounded side-channel for auxiliary fields (tenant, region, user tags) without expanding the
IContextcontract on every new field.Problem
Ad hoc baggage (e.g. W3C
baggageheader) has no structure or limits here. Unbounded key/value growth can overload HTTP headers/queue headers, and heavy use risks violating the principle "context is metadata, not state".Scope
Set/Get/RemoveAPI with static ambient facade plus injectable instance.Design Expectations
ContextStore).IContextcontract is unchanged.CompositePropagator/[Context]: add W3C/B3/composite propagator adapters and queue carriers #12 rather than a bespoke carrier.Acceptance Criteria
Non-Goals