opentelemetry-propagator-b3
OpenTelemetry B3 Propagator
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-b3uv
uv add opentelemetry-propagator-b3poetry
poetry add opentelemetry-propagator-b3Installing 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
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
opentelemetry-propagator-jaegerProvides trace context propagation for the…
permissive · top 5,000 on PyPI
opentelemetry-propagator-ot-traceProvides OpenTelemetry trace context…
permissive · top 5,000 on PyPI
opentelemetry-propagator-aws-xrayInjects and extracts AWS X-Ray tracing context…
permissive · top 5,000 on PyPI
opentelemetry-propagator-gcpPropagates trace context in Google Cloud's…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-djangoAdds distributed tracing to Django applications…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-botoAdds distributed tracing to AWS SDK (Boto)…
permissive · top 5,000 on PyPI
uptraceUptrace is a thin wrapper over OpenTelemetry…
permissive · top 15,000 on PyPI
azure-core-tracing-opentelemetryIntegrates Azure SDK clients with OpenTelemetry…
unclear · top 5,000 on PyPI