Registry /
observability / opentelemetry-exporter-zipkin-proto-http
Install & Compatibility
Where this runs
tested against v1.42.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.930s · 27.4MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 3.1s · import 0.847s · 30MB
26MB installed
● package 26MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ZipkinExporter
✓ from opentelemetry.exporter.zipkin.proto.http import ZipkinExporter
TracerProvider
✓ from opentelemetry.sdk.trace import TracerProvider
BatchSpanProcessor
✓ from opentelemetry.sdk.trace.export import BatchSpanProcessor
trace
✓ from opentelemetry import trace
✗ from opentelemetry.trace import trace
The `trace` module is a top-level package.
This quickstart demonstrates how to set up the Zipkin Proto HTTP Exporter to send traces. It initializes a `TracerProvider`, configures `ZipkinExporter` with an endpoint (defaulting to `http://localhost:9411/api/v2/spans` or an environment variable), attaches it to a `BatchSpanProcessor`, and creates a simple span. Remember to run a Zipkin collector (e.g., via `docker run --rm -d -p 9411:9411 --name zipkin openzipkin/zipkin`) for traces to be received.
import os
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.zipkin.proto.http import ZipkinExporter
# Configure the TracerProvider
provider = TracerProvider()
trace.set_tracer_provider(provider)
# Configure Zipkin Exporter
# The endpoint can also be configured via OTEL_EXPORTER_ZIPKIN_ENDPOINT environment variable
zipkin_endpoint = os.environ.get('OTEL_EXPORTER_ZIPKIN_ENDPOINT', 'http://localhost:9411/api/v2/spans')
zipkin_exporter = ZipkinExporter(endpoint=zipkin_endpoint)
# Add the exporter to a BatchSpanProcessor
span_processor = BatchSpanProcessor(zipkin_exporter)
provider.add_span_processor(span_processor)
# Get a tracer and create a span
tracer = trace.get_tracer(__name__)
with tracer.start_as_current_span("my-zipkin-span") as span:
span.set_attribute("event.name", "Quickstart event")
span.add_event("Processing data")
print("Hello from OpenTelemetry with Zipkin!")
# Ensure all spans are exported before application exit
provider.shutdown()
Debug
Known issues
breakingIn v1.40.0, the behavior of `start_span` and `start_as_current_span` within `NoOpTracer` (used when the SDK is not initialized) was fixed to correctly propagate span context. Previously, it would strictly return `INVALID_SPAN`, potentially causing unexpected tracing behavior in certain scenarios.fixReview any code that relies on `NoOpTracer` explicitly or implicitly when the SDK is not present, as span context will now propagate.
affects: >=1.40.0
deprecatedThe OpenTelemetry project is deprecating the Zipkin exporter specification in favor of Zipkin's OTLP ingestion support. Existing Zipkin exporters will continue to receive security patches and critical bug fixes until at least December 2026. Users are strongly encouraged to migrate to OTLP for long-term support and broader compatibility.fixConsider switching to the OpenTelemetry Protocol (OTLP) exporter (`opentelemetry-exporter-otlp-proto-http`) and routing data via the OpenTelemetry Collector, which can then export to Zipkin if needed.
affects: All versions (deprecation announced Dec 2025)
gotchaIncorrectly configuring the Zipkin collector endpoint can lead to spans not being exported, often silently. Common issues include wrong host, port, or protocol, or the Zipkin collector not being accessible/running.fixEnsure the `endpoint` parameter in `ZipkinExporter` or the `OTEL_EXPORTER_ZIPKIN_ENDPOINT` environment variable points to a reachable and correctly configured Zipkin collector (e.g., `http://localhost:9411/api/v2/spans`). Check network connectivity and firewall rules. Run `docker run --rm -d -p 9411:9411 --name zipkin openzipkin/zipkin` to quickly test a local Zipkin instance.
affects: All versions
Upgrade
Version history
1.42.1latest on PyPI · released May 21, 2026
Audit
Dependencies
opentelemetry-apirequiredCore OpenTelemetry API for tracing concepts.
opentelemetry-sdkrequiredOpenTelemetry SDK for trace processing and management.
requestsrequiredUsed for making HTTP requests to the Zipkin collector.
protobufrequiredRequired for Protobuf serialization of span data.