Summary
Add a lightweight, opt-in propagation and tracing surface so context metadata
survives the process boundary (HTTP, gRPC, queues) and can be correlated
end-to-end.
Goal
Make the package observable and transportable across process boundaries without
turning it into a telemetry framework.
Problem
The context lives in AsyncLocal<T> and flows through await/Task within one
process, but it is lost at network boundaries (HTTP, gRPC, queues). There is no
simple, library-level way to write the current context into an outbound carrier
and rebuild it on the receiving side.
While the package now exposes the core serializer and propagator contracts
(IContextSerializer<T>, IContextPropagator<TCarrier>, ContextPayload),
there is no ready-made adapter for header carriers and no illustration of how
to rebuild context on the receiving side, so tracing an operation's flow across
services is awkward for:
- tracing
- auditing
- debugging
- integration with observability pipelines
- custom instrumentation in larger applications
Scope
Design Expectations
- Propagation is opt-in and explicit; the library never auto-exports context.
- The propagator does not know the serializer or the concrete context type.
- The API focuses on observation/transport, not on policy.
- Consumers can ignore the propagation layer entirely.
- Context stays immutable; tracing is built on lifecycle events, never on the
context object.
Acceptance Criteria
Non-Goals
- No W3C
traceparent/tracestate or B3 support in v1.
- No APM/OpenTelemetry-specific sink.
- No background event bus.
- No retry/persistence/compliance layer.
- No changes to the core runtime execution path.
Notes
This issue covers distributed propagation (cross-boundary correlation) only.
Full OpenTelemetry/APM integration is out of scope here.
Summary
Add a lightweight, opt-in propagation and tracing surface so context metadata
survives the process boundary (HTTP, gRPC, queues) and can be correlated
end-to-end.
Goal
Make the package observable and transportable across process boundaries without
turning it into a telemetry framework.
Problem
The context lives in
AsyncLocal<T>and flows throughawait/Taskwithin oneprocess, but it is lost at network boundaries (HTTP, gRPC, queues). There is no
simple, library-level way to write the current context into an outbound carrier
and rebuild it on the receiving side.
While the package now exposes the core serializer and propagator contracts
(
IContextSerializer<T>,IContextPropagator<TCarrier>,ContextPayload),there is no ready-made adapter for header carriers and no illustration of how
to rebuild context on the receiving side, so tracing an operation's flow across
services is awkward for:
Scope
X-Correlation-Id,X-Tenant-Id)built on
IContextPropagator<TCarrier>.rebuilding it with
BeginContext.IContextPropagator/IContextSerializerusage against the newContextPayloadcontract.Activityside as an observer (no change to the coreexecution path).
Design Expectations
context object.
Acceptance Criteria
Previous/Currenttransitions for correlation.
Non-Goals
traceparent/tracestateor B3 support in v1.Notes
This issue covers distributed propagation (cross-boundary correlation) only.
Full OpenTelemetry/APM integration is out of scope here.