Skip to content

[Context]: add W3C/B3/composite propagator adapters and queue carriers #12

Open
0 of 1 issue completed

Description

@rian-be

Summary

Add production propagator adapters on top of the existing IContextPropagator<TCarrier> / IContextSerializer<T> contracts: W3C Trace Context, B3, header-baggage, and a CompositePropagator that composes several at once, plus queue/Message transport via serialization.

Goal

Turn the generic propagation contracts (Category 8) into concrete, interoperable adapters, and allow several propagators to run together.

Problem

IContextPropagator/IContextSerializer are abstractions only. Consumers who need W3C traceparent/tracestate, B3, or multi-standard support have to reimplement spec parsing and composition themselves. There is no CompositePropagator and no bag/bounded-header handling to avoid transport overload.

Scope

  • W3CTraceContextPropagator (traceparent, tracestate), spec-compliant per 1.2.
  • B3Propagator (single/multi header) per 1.5.
  • CompositePropagator running several propagators in one Inject/Extract call per 1.5; last-in wins on key conflicts.
  • Bounded baggage key-value transport per 1.6 (bounded key count and total size).
  • Queue/Message carrier propadapter reusing IContextSerializer<T> per 1.7 (Kafka/RabbitMQ/ServiceBus) — no static helpers, injected instances.
  • Companion example(s) for HTTP headers, W3C, and queue payloads.

Design Expectations

  • Propagators are opt-in and explicit; library never auto-exports context.
  • Conflicting keys across propagators resolve by last registered wins (overridable by app-specific propagators).
  • Baggage and context stay bounded against transport overload; IContextValidator guards inbound values per 1.2 spoofing risk.
  • Queue propagation uses the serializer + TCarrier abstraction from Category 8 rather than bespoke static API.

Acceptance Criteria

  • CompositePropagator.Inject/Extract composes multiple standards in one call.
  • W3C and B3 round-trip tests pass against the spec's example trace/span IDs.
  • Baggage is size/key-bounded and fails validation above limits.
  • A Message (queue) propagator round-trips through serialization.
  • No breaking change to existing core contracts.

Non-Goals

  • No default W3C/B3 naming baked into Core (stays adapter-level).
  • No route/priority negotiation beyond last-in-wins.
  • No retry/persistence/compliance layer.

Sub-issues

Sub-issues

0 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added
    enhancement
    on Aug 7, 2026
  2. added
    adapter
    extension
    propagation
    on Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    adapterenhancementextensionpropagation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions