Registry / observability / opentelemetry-exporter-zipkin-proto-http

opentelemetry-exporter-zipkin-proto-http

JSON →
library1.42.1pypypiunverified

The `opentelemetry-exporter-zipkin-proto-http` library provides a Span Exporter for OpenTelemetry Python, enabling applications to send tracing data to a Zipkin collector using Protobuf over HTTP. It is an integral part of the OpenTelemetry Python project, which maintains an active release cadence, with the current version being 1.41.0.

pip install opentelemetry-exporter-zipkin-proto-http opentelemetry-sdk
INSTALL
IMPORT
SIG · OPENTELEMETRY-EXPO
O
opentelemetry-exporter-zipkin-proto-http
observabilitypythonv1.42.1
Install
3.1s avg
Import
889ms
Disk
26MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.930s · 27.4MB
glibc
py 3.103.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.
fix
Review 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.
fix
Consider 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.
fix
Ensure 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.
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
2
Resources
opentelemetry-exporter-zipkin-proto-http — pip install opentelemetry-exporter-zipkin-proto-http · libregistry