A propagator is a component in a distributed tracing library responsible for injecting trace context into outbound requests and extracting it from inbound requests, following a specific wire format. Its core function is to serialize and deserialize the immutable span context—containing the trace ID, span ID, and sampling flags—into transport-specific headers (like HTTP) or message metadata, enabling distributed context propagation across a system.
Glossary
Propagator

What is a Propagator?
In distributed tracing, a propagator is the library component responsible for managing trace context across service boundaries.
Propagators implement standardized formats such as W3C Trace Context or vendor-specific ones like B3 Propagation to ensure interoperability between heterogeneous services. By managing this cross-process handoff, the propagator is the essential mechanism that allows tracing backends to reconstruct a complete, end-to-end trace from individually instrumented spans, forming the foundation for latency analysis and dependency mapping.
Core Responsibilities of a Propagator
A propagator is a critical component within a tracing library responsible for managing the flow of trace context across service boundaries. Its primary function is to ensure the continuity of a trace as a request traverses a distributed system.
Context Injection
The propagator injects the current trace context into the headers of an outbound request. This context includes the Trace ID, Span ID, and other metadata like trace flags and trace state. The specific headers and their format are dictated by the chosen propagation standard (e.g., traceparent for W3C, X-B3-TraceId for B3). This injection is what allows the next service in the chain to link its work to the ongoing trace.
Context Extraction
On the receiving end of a request, the propagator extracts the trace context from the incoming request's headers. It parses the headers according to the expected wire format and reconstructs a SpanContext object. This extracted context is then used to create a child span, ensuring the new operation is correctly parented within the existing trace. If no context is found, the propagator may start a new root trace.
Wire Format Compliance
A propagator implements a specific wire format protocol for serializing and deserializing trace context. Common standards include:
- W3C Trace Context: The modern, vendor-neutral standard using
traceparentandtracestateHTTP headers. - B3 Propagation: The format used by Zipkin, with headers like
X-B3-TraceIdandX-B3-SpanId. - Jaeger Propagation: Extends B3 with additional headers like
uber-trace-id. The propagator must handle edge cases like multi-header formats and malformed data gracefully.
Multi-Format Support & Fallback
In heterogeneous environments, services may use different propagation formats. A robust propagator often supports multiple formats simultaneously. It will attempt extraction using a prioritized list of formats (e.g., try W3C first, then B3). Some advanced implementations can even inject context in multiple formats in a single outbound request to ensure compatibility with all downstream services, a pattern known as dual propagation.
Baggage Propagation
Beyond basic trace identifiers, many propagators are also responsible for handling distributed baggage. Baggage consists of key-value pairs that are propagated alongside the trace context, allowing user-defined data (e.g., user-id, feature-flag) to be passed transparently through the call chain. The propagator must inject and extract these baggage items according to the protocol's rules, often using a separate header like baggage.
Integration with Instrumentation
The propagator does not work in isolation. It is integrated into the tracing SDK's instrumentation for network clients and servers. For example:
- In an HTTP client interceptor, it calls the inject method before sending the request.
- In an HTTP server middleware, it calls the extract method as the first operation.
This integration is often abstracted by frameworks (like OpenTelemetry's
TextMapPropagatorinterface), allowing developers to swap propagation schemes without changing application code.
How Propagators Work in a Trace
A propagator is the core library component responsible for the transparent transmission of trace context across service boundaries, ensuring the continuity of a distributed trace.
A propagator is a component in a tracing library responsible for injecting trace context into outbound requests and extracting it from inbound requests, following a specific wire format. Its primary function is to serialize and deserialize the immutable span context—containing the trace ID, span ID, and sampling flags—into transport-specific headers (e.g., HTTP, gRPC, message queues). This enables distributed context propagation, allowing a single logical trace to be reconstructed from its constituent spans across a network of services.
Propagators implement standardized formats like W3C Trace Context or vendor-specific ones like B3 Propagation. During injection, the propagator encodes the current span's context into carrier headers. Upon extraction at the next service, it decodes these headers to establish the proper parent-child relationship for new spans. This mechanism is decoupled from span creation itself, allowing tracing systems to support multiple propagation formats simultaneously for interoperability in heterogeneous environments.
Common Trace Context Propagation Formats
A comparison of the primary wire formats used by propagators to inject and extract trace context across service boundaries.
| Feature / Specification | W3C TraceContext | Zipkin B3 | Jaeger |
|---|---|---|---|
Standardization Body | W3C Recommendation | OpenZipkin Community | CNCF (Jaeger Project) |
Primary Header(s) | traceparent, tracestate | X-B3-TraceId, X-B3-SpanId, X-B3-Sampled | uber-trace-id |
Trace ID Format | 32 hex chars (16 bytes), lowercase | 32 or 16 hex chars | 64-bit unsigned int, hex encoded |
Span ID Format | 16 hex chars (8 bytes), lowercase | 16 hex chars | 64-bit unsigned int, hex encoded |
Sampling Decision Field | Trace flags (1 byte in traceparent) | X-B3-Sampled (0/1) | Flags byte (in uber-trace-id) |
Supports Trace State | |||
Vendor-Specific Extensions | Via tracestate key-value pairs | Via baggage headers (uberctx-*) | |
Default Propagation Medium | HTTP Headers, gRPC Metadata | HTTP Headers | HTTP Headers |
OpenTelemetry SDK Default |
Propagators in Frameworks and SDKs
A propagator is the component within a tracing library responsible for the serialization and deserialization of trace context across service boundaries. This section details its concrete implementations across major observability frameworks.
OpenTelemetry SDK Propagators
The OpenTelemetry SDK provides a pluggable architecture for propagators, implementing the TextMapPropagator interface. Key built-in implementations include:
- W3C TraceContext Propagator: Handles the
traceparentandtracestateheaders as per the W3C recommendation. - W3C Baggage Propagator: Manages the propagation of correlation context (
baggageheader). - B3 Propagator: Supports the Zipkin-originated B3 Propagation format (single and multi-header variants).
- Jaeger Propagator: Handles the
uber-trace-idheader format used by Jaeger. Developers configure the global propagator viaGlobalPropagators.set()to define the wire format for their services.
The TextMapPropagator Interface
This is the core abstraction for propagators in OpenTelemetry. It defines two critical methods:
inject(context, carrier, setter): Injects the current span context (trace ID, span ID, etc.) from the givencontext.Contextinto a carrier object (e.g., HTTP request headers). Thesetteris a callback that knows how to insert a key-value pair into that specific carrier type.extract(context, carrier, getter): Extracts a span context from an incoming carrier (e.g., HTTP response headers) using the providedgettercallback. It returns a newcontext.Contextcontaining the extracted span context, or an invalid one if no context was found. This interface enables propagators to work with any transport (HTTP, gRPC, Kafka, etc.) via carrier-specific getter/setter functions.
Propagation in Messaging Systems
Propagators extend beyond HTTP to asynchronous communication. For systems like Apache Kafka, RabbitMQ, or AWS SQS, the trace context is injected into and extracted from message metadata (headers).
- Carrier: The message's header map.
- Challenge: Context must survive queueing and processing delays, linking producer and consumer spans across different traces via span links.
- Implementation: SDKs provide helper
getterandsetterfunctions for common messaging clients. For example, the OpenTelemetry Kafka instrumentation uses a propagator to inject context intoProducerRecord.headers.
Composite and Custom Propagators
Real-world deployments often require multiple propagation formats.
- Composite Propagator: Chains several propagators together. The SDK will attempt extraction using each propagator in sequence until one succeeds. This is essential for migrating between formats (e.g., from B3 to W3C) or in heterogeneous environments.
- Custom Propagator: Organizations can implement the
TextMapPropagatorinterface for proprietary header formats or to add business-specific context to the propagation carrier. This is also used for trace enrichment at the edge by injecting additional metadata (e.g., tenant ID) that downstream services can extract.
Propagator Configuration in Agents
Auto-instrumentation agents (e.g., Java Agent, .NET CLR Profiler) handle propagator configuration automatically. They detect common web and RPC frameworks and inject the appropriate instrumentation, using a default propagator (often W3C).
- Environment Variables: The propagator can be configured via
OTEL_PROPAGATORS, accepting values liketracecontext,baggage,b3. - Priority: The agent's configured propagator overrides any programmatic setup in the application code, ensuring consistency across a fleet of services instrumented via agents.
Propagation in gRPC and RPC Frameworks
gRPC uses HTTP/2 as its transport, so propagation occurs via HTTP headers. However, the integration is framework-specific.
- OpenTelemetry gRPC Instrumentation: Provides interceptors (
ClientInterceptor,ServerInterceptor) that automatically call the configured propagator'sinjectandextractmethods on the gRPC metadata object. - Carrier: The
Metadataobject (key-value pairs). - Process: On the client side, the interceptor injects context into outgoing metadata. On the server side, the interceptor extracts context from incoming metadata, creating a proper parent-child relationship between the client and server spans.
Frequently Asked Questions
A propagator is a critical component in distributed tracing responsible for managing the flow of trace context across service boundaries. These questions address its core functions, implementation, and role within modern observability frameworks.
A propagator is a component within a tracing library or SDK responsible for injecting trace context into outbound requests and extracting it from inbound requests, following a specific wire format standard. Its primary function is to ensure the span context—containing the trace ID, span ID, and other diagnostic information—is correctly passed between services, enabling the reconstruction of a complete, end-to-end trace. Without a propagator, spans generated in different services would be uncorrelated, breaking distributed visibility.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
A propagator operates within a larger ecosystem of distributed tracing components and standards. These related concepts define the data it carries, the formats it uses, and the systems it integrates with.
Span Context
The immutable state that a propagator is responsible for transmitting. It contains the core identifiers and flags necessary for trace continuity, including:
- Trace ID: The globally unique identifier for the entire request.
- Span ID: The identifier for the current unit of work.
- Trace Flags: Bits that control behavior, most notably the sampling decision.
- Trace State: A key-value map for carrying vendor-specific trace data. The propagator's sole function is to inject this context into outbound calls and extract it from inbound calls.
W3C Trace Context
The modern, standardized wire format for trace propagation, defined as a W3C Recommendation. It uses two primary HTTP headers:
traceparent: Carries the version, trace ID, span ID, and trace flags in a compact, delimited string.tracestate: Carries supplemental vendor-specific data in a key-value format. A W3C propagator is the most common implementation today, ensuring interoperability between different programming languages, frameworks, and observability backends (e.g., Jaeger, Zipkin, commercial APMs).
B3 Propagation
An earlier, de-facto standard propagation format pioneered by the Zipkin tracing system. It uses multiple HTTP headers prefixed with X-B3-, such as:
X-B3-TraceIdX-B3-SpanIdX-B3-ParentSpanIdX-B3-SampledWhile largely superseded by W3C Trace Context for HTTP, B3 remains prevalent in legacy systems and some non-HTTP protocols (e.g., gRPC metadata, Kafka headers). A robust tracing library often includes both B3 and W3C propagators.
OpenTelemetry (OTel) API
The vendor-neutral framework where propagators are concretely implemented. In OpenTelemetry, the Propagator interface is defined in the API SDK. Key implementations include:
W3CTraceContextPropagator: For W3C Trace Context.B3Propagator: For single-header (b3) and multi-header (X-B3) B3 formats.CompositePropagator: Allows multiple propagators (e.g., W3C and baggage) to work together. The OTel SDK uses these propagators automatically within its HTTP client/server instrumentation, handling context propagation transparently for developers.
Instrumentation
The code that generates tracing data (spans). Propagators are a critical sub-component of instrumentation. The relationship is hierarchical:
- Instrumentation wraps a library (e.g.,
requestsin Python,fetchin Node.js). - It uses the Tracer to create spans.
- The Tracer uses the registered Context.
- The Context is managed by the Propagator at system boundaries. In auto-instrumentation, this entire chain—including propagator setup—is configured automatically by an agent, requiring zero code changes.
Distributed Context Propagation
The broader architectural pattern that trace propagation is a part of. It encompasses:
- Mechanism: The propagator component itself.
- Carrier: The medium that transports the context (e.g., HTTP headers, gRPC metadata, AMQP properties, Kafka message headers).
- Format: The serialization standard (W3C, B3).
- Scope: Extending beyond just traces to include baggage (user-defined key-value pairs) and other correlation context (e.g., log correlation IDs). This pattern is essential for maintaining a consistent request context across asynchronous and synchronous calls in a microservices architecture.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us