B3 Propagation is a trace context propagation format that uses HTTP headers prefixed with X-B3- to transmit the identifiers and sampling state necessary for distributed tracing. The core headers are X-B3-TraceId, X-B3-SpanId, and X-B3-Sampled, which carry the trace ID, span ID, and sampling decision, respectively, enabling instrumentation libraries to correlate work across service boundaries. This simple, text-based format was pioneered by Zipkin and became a de facto standard before the W3C Trace Context specification.
Glossary
B3 Propagation

What is B3 Propagation?
B3 Propagation is a specific HTTP header format for transmitting distributed trace context, originally developed for the Zipkin tracing system.
In modern observability stacks, B3 is implemented as a propagator within frameworks like OpenTelemetry, allowing for interoperability with legacy systems. While newer standards like W3C Trace Context offer more features, B3 remains widely supported for its simplicity. Its primary function is to ensure end-to-end tracing continuity by injecting context into outbound requests and extracting it from inbound requests, forming a complete trace composed of linked spans.
Core B3 Headers
B3 Propagation is a trace context propagation format originally developed by Zipkin, using HTTP headers prefixed with 'X-B3-' to transmit trace and span IDs. These headers are the fundamental building blocks for linking distributed operations.
X-B3-TraceId
The X-B3-TraceId header carries a 128-bit or 64-bit globally unique identifier for the entire request trace. This ID is generated by the root service and must be propagated unchanged to all downstream services, enabling the correlation of all spans belonging to a single user request. It is typically represented as a 32-character (128-bit) or 16-character (64-bit) hexadecimal string.
- Purpose: Uniquely identifies the end-to-end request.
- Format: 32 or 16 character lowercase hex string (e.g.,
463ac35c9f6413ad48485a3953bb6124). - Generation: Created once by the initiating service.
X-B3-SpanId
The X-B3-SpanId header carries a 64-bit identifier for the current unit of work (span) within a service. Each service creates a new Span ID for its operation. This ID, combined with the Trace ID, uniquely identifies a specific span in the distributed system.
- Purpose: Identifies a single operation within a service.
- Format: 16 character lowercase hex string (e.g.,
a2fb4a1d1a96d312). - Parent-Child: The Span ID of a parent span is passed to a child service as the X-B3-ParentSpanId.
X-B3-ParentSpanId
The X-B3-ParentSpanId header is optional and is used to explicitly define the parent-child relationship between spans. When a service (the client) calls another service (the server), it includes its own Span ID in this header. The receiving service uses this to link its new span as a child of the caller's span, constructing the trace's call graph.
- Purpose: Establishes direct parentage between spans.
- Inclusion: Sent by a calling service to the service it invokes.
- Absence: If omitted, the receiving span is considered a root span within that trace.
X-B3-Sampled
The X-B3-Sampled header communicates the sampling decision for the trace. It is a single-character flag ('1', '0', 'd') that instructs downstream services whether to record and export span data for this request, which is critical for managing telemetry volume and cost.
'1': Debug. Record and export this trace, overriding any other sampling configuration.'1': Sample. Record and export this trace.'0': Do not sample. Process the request but do not record/export spans.- Decision Point: Typically made by the root service or a gateway.
X-B3-Flags
The X-B3-Flags header is used to communicate specific control flags for the trace. The most significant flag is the debug flag, which takes precedence over the X-B3-Sampled header. This header uses a bitmask representation, though it is often seen as a decimal integer ('1' for debug).
- Debug Flag (bit 0): When set to
1, it forces sampling for the entire trace, regardless of other rules. This is used for actively troubleshooting specific requests. - Legacy Use: In older implementations,
X-B3-Flags: 1was equivalent toX-B3-Sampled: 1. - Precedence: Debug flag overrides all other sampling configurations.
Propagation Mechanics & Interoperability
B3 headers are injected into outbound HTTP requests by a propagator in the tracing SDK and extracted from inbound requests. While a de facto standard, B3 is largely superseded by the vendor-neutral W3C Trace Context standard for better interoperability. Modern systems often support both.
- Injection/Extraction: Handled automatically by tracing libraries (e.g., OpenTelemetry SDK).
- Limitation: B3 only supports a single parent, while W3C TraceContext supports multiple linked contexts.
- Coexistence: Systems can be configured to read both B3 and W3C headers, with a defined precedence order for backward compatibility.
B3 vs. W3C Trace Context
A technical comparison of two primary wire formats used for propagating distributed trace context across service boundaries.
| Feature | B3 Propagation | W3C Trace Context |
|---|---|---|
Origin & Standardization | Developed by Zipkin; community-driven de facto standard | W3C Recommendation (formal web standard) |
Header Prefix & Style | Uses 'X-B3-' prefix (e.g., X-B3-TraceId) | Uses 'traceparent' and 'tracestate' headers (no 'X-' prefix) |
Trace ID Format | 16 or 32 character lowercase hex string | 32 character lowercase hex string (version 00 of traceparent) |
Span ID Format | 16 character lowercase hex string | 16 character lowercase hex string |
Parent Span ID | Separate 'X-B3-ParentSpanId' header | Encoded within the 'traceparent' header value |
Sampling Decision | Separate 'X-B3-Sampled' header (0/1 or true/false) | Encoded as flags within the 'traceparent' header value |
Debug/Trace Flag | Separate 'X-B3-Flags' header (1 for debug) | Encoded as flags within the 'traceparent' header value |
Vendor/System State | Not natively supported; requires custom headers | Dedicated 'tracestate' header for multi-vendor key-value pairs |
Primary Use Case | Legacy and Zipkin-centric deployments | Modern, vendor-interoperable systems and OpenTelemetry |
OpenTelemetry Default |
Where is B3 Propagation Used?
B3 Propagation, as a foundational wire format for trace context, sees use in specific legacy systems, modern observability tools that prioritize compatibility, and environments where its simplicity is advantageous.
Legacy Microservices & Brownfield Deployments
In brownfield deployments and legacy microservice architectures built before the W3C Trace Context standard, B3 is often the de facto propagation format. Many older service meshes (like early Linkerd versions) and frameworks (like Spring Cloud Sleuth) defaulted to B3. Migrating these systems can be costly, so B3 remains in active use to maintain backward compatibility and avoid trace breakage.
Service Meshes and Proxies
Several service mesh implementations support B3 Propagation for trace context passing, often alongside other formats. For example:
- Istio can be configured to propagate B3 headers.
- Envoy proxy includes built-in support for generating and propagating B3 headers. This allows traces to flow seamlessly through the data plane, even if application code is not fully instrumented, providing network-level observability.
Multi-Format Observability Pipelines
Modern observability pipelines and backends are designed to handle multiple propagation formats simultaneously. Tools like the OpenTelemetry Collector can receive, parse, and normalize traces using B3, W3C Trace Context, and other formats into a single standard (like OTLP). This allows organizations with heterogeneous systems to maintain a unified view without forcing a immediate, system-wide format change.
Cross-Language Tracing Libraries
Many language-specific tracing SDKs and auto-instrumentation agents offer B3 support to ensure interoperability. For instance:
- The OpenTelemetry SDKs for Java, Go, Python, etc., include B3 propagators.
- Jaeger client libraries often support B3 alongside their native Uber headers. This ensures that services written in different programming languages can participate in the same trace when B3 is the chosen wire protocol.
Context Propagation in Asynchronous & Messaging Systems
B3 headers can be embedded within the metadata of asynchronous messaging systems (like Kafka, RabbitMQ) and RPC frameworks (like gRPC) to propagate trace context across non-HTTP boundaries. While less standardized than HTTP, this practice is used to trace workflows that involve message queues, ensuring the causal chain is not broken by asynchronous processing.
Frequently Asked Questions
B3 Propagation is a trace context propagation format originally developed by Zipkin, using HTTP headers prefixed with 'X-B3-' to transmit trace and span IDs. This FAQ addresses common questions about its mechanics, use cases, and relationship to modern standards.
B3 Propagation is a specific wire format for distributed context propagation, using a set of HTTP headers prefixed with X-B3- to transmit trace context between services. It works by having the initiating service (the trace root) generate a Trace ID and initial Span ID, then inject these values into outbound HTTP request headers. Each downstream service extracts these headers, creates a new child span linked to the incoming parent span, and propagates the headers further, thereby stitching together a complete trace across service boundaries.
The core headers are:
X-B3-TraceId: The 128-bit or 64-bit globally unique identifier for the trace.X-B3-SpanId: The 64-bit identifier for the current span.X-B3-ParentSpanId: The Span ID of the parent span (omitted for the root span).X-B3-Sampled: A flag (1or0) indicating whether the trace should be sampled and recorded.X-B3-Flags: A debug flag that overrides the sampling decision, forcing trace collection.
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
B3 Propagation is one specific format for transmitting trace context. These related concepts define the broader ecosystem of distributed tracing, instrumentation, and telemetry collection.
Distributed Context Propagation
This is the general mechanism for passing trace context (like Trace ID, Span ID) across service boundaries. It ensures a request's journey can be reconstructed.
- Carriers: Context is embedded in transport protocols, commonly as HTTP headers (for B3, W3C) or in message metadata (e.g., Kafka, gRPC).
- Process: A propagator component in the tracing SDK handles injecting context into outbound requests and extracting it from inbound requests.
Span Context
Span context is the immutable state that must be propagated. It is the payload carried by formats like B3. Its core components are:
- Trace ID: The global identifier for the entire request.
- Span ID: The identifier for the current unit of work.
- Trace Flags: Contains the sampling decision (e.g.,
sampled=1). - Trace State: Provides additional vendor-specific trace data (more flexible than B3's limited headers). This context is created at the start of a span and passed along to create child spans.
Propagator
A propagator is the concrete implementation in a tracing library (e.g., OpenTelemetry SDK) that serializes and deserializes span context according to a specific wire format.
- B3 Propagator: Injects/extracts the
X-B3-*headers. - W3C TraceContext Propagator: Handles the
traceparentheader. - Composite Propagator: Used to support multiple formats simultaneously (e.g., both B3 and W3C) for backward compatibility in heterogeneous environments.
Trace Sampling
Propagation headers like B3's X-B3-Sampled communicate the sampling decision—whether this trace should be recorded and exported. This controls data volume and cost.
- Head Sampling: The decision is made at the trace's start (root span). The sampling flag (
1or0) is propagated to all downstream services, ensuring the entire trace is either recorded or dropped consistently. - Tail Sampling: The decision is made after trace completion based on its full data (e.g., only keep traces with errors). This requires all spans to be sent to a central processor (like the OpenTelemetry Collector) before the decision is made.

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