skillfed

opentelemetry-propagator-b3

OpenTelemetry B3 Propagator

opentelemetry-propagator-b3 v1.44.0 4.8M downloads/30d#2,229 on PyPI2,588
Permissive license Apache-2.0 Active released

What it is and what it does

This package provides a B3 propagator for OpenTelemetry Python, implementing the B3 trace context format used by distributed tracing systems. It handles the serialization and deserialization of trace identifiers and sampling decisions into HTTP headers or other carrier formats, allowing trace context to flow across service boundaries in microservice architectures.

The propagator integrates with the OpenTelemetry API and is designed to be used alongside the OpenTelemetry SDK and instrumentation packages. It depends only on opentelemetry-api and typing-extensions, keeping the installation lightweight. The package is production-stable, supports Python 3.10 through 3.14, and receives regular maintenance from the OpenTelemetry project.

Use it for:

  • Propagate trace context in HTTP requests between microservices using B3 headers
  • Integrate legacy B3-instrumented systems with OpenTelemetry observability pipelines
  • Extract trace IDs and sampling decisions from incoming B3-formatted requests in service handlers
  • Enable correlation of logs and metrics across services that use B3 trace propagation

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Implements the B3 trace context propagation format for OpenTelemetry, enabling distributed tracing across services by injecting and extracting trace headers.

Yes. Install this if you need B3 trace propagation in an OpenTelemetry-instrumented application or are integrating with systems that use B3 headers. Low install friction, active maintenance, no security vulnerabilities, and permissive licensing make it a straightforward choice for distributed tracing scenarios.

Install

opentelemetry-propagator-b3 on PyPI

pip

pip install opentelemetry-propagator-b3

uv

uv add opentelemetry-propagator-b3

poetry

poetry add opentelemetry-propagator-b3

Installing opentelemetry-propagator-b3

Before you install

Low friction install with minimal dependencies. Actively maintained with a recent release (29 days old) and backed by the OpenTelemetry project's established infrastructure.

License in practice

Apache-2.0 permissive license allows free use, modification, and distribution in both open and closed-source projects without copyleft obligations.

Quickstart

pip install opentelemetry-propagator-b3

from opentelemetry.propagators.b3 import B3Format
from opentelemetry import trace

# B3Format is registered and used by OpenTelemetry instrumentations
# to inject/extract trace context in B3 format

Requires Python 3.10 or later; opentelemetry-api must be installed and configured with appropriate SDK and instrumentations for tracing to function.

Verify before relying

  • Whether B3 single-header format is supported in addition to multi-header format
  • Performance characteristics when propagating traces at high throughput
  • Compatibility with non-OpenTelemetry B3 implementations

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — opentelemetry-api, typing-extensions
Maintenance actively maintained — 29 days since the last release
Last repo commit
First released
Downloads 4,792,404/month — #2,229 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: opentelemetry_propagator_b3-1.44.0-py3-none-any.whl

Development Status :: 5 - Production/StableFramework :: OpenTelemetryIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Tags

b3 trace propagationdistributed tracing headersopentelemetry propagatortrace context injectionb3 format propagationcross-service tracingopentelemetry b3
distributed-tracingobservabilityb3-format

More Monitoring packages