Registry / observability / opentelemetry-exporter-zipkin

opentelemetry-exporter-zipkin

JSON →
library1.42.1pypypiunverified

The `opentelemetry-exporter-zipkin` library provides a Span Exporter for OpenTelemetry Python, enabling the export of trace data to Zipkin. It is part of the OpenTelemetry Python project, currently at version 1.41.0, and typically releases updates on a monthly or bi-monthly basis.

pip install opentelemetry-exporter-zipkin
INSTALL
IMPORT
SIG · OPENTELEMETRY-EXPO
O
opentelemetry-exporter-zipkin
observabilitypythonv1.42.1
Install
3.1s avg
Import
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.000s · 27.5MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 3.1s · import 0.000s · 30MB
26MB installed
● package 26MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ZipkinSpanExporter
from opentelemetry.exporter.zipkin.zipkin import ZipkinSpanExporter
from opentelemetry.exporter.zipkin import ZipkinSpanExporter

This quickstart demonstrates how to configure OpenTelemetry Python to send traces to a Zipkin collector. It sets up a `TracerProvider`, `BatchSpanProcessor`, and `ZipkinSpanExporter`, using environment variables for the Zipkin endpoint, and then creates a simple traced operation. Ensure a Zipkin collector is running and accessible at the specified endpoint.

import os from opentelemetry import trace from opentelemetry.exporter.zipkin import ZipkinSpanExporter from opentelemetry.sdk.resources import Resource, SERVICE_NAME from opentelemetry.sdk.trace import TracerProvider from opentelemetry.sdk.trace.export import BatchSpanProcessor # Configure the service name resource = Resource.create({ SERVICE_NAME: "my-zipkin-service" }) # Configure TracerProvider tracer_provider = TracerProvider(resource=resource) # Get Zipkin collector endpoint from environment variable or use default zipkin_endpoint = os.environ.get( "OTEL_EXPORTER_ZIPKIN_ENDPOINT", "http://localhost:9411/api/v2/spans" ) # Configure ZipkinSpanExporter zipkin_exporter = ZipkinSpanExporter(endpoint=zipkin_endpoint) # Configure BatchSpanProcessor and add exporter span_processor = BatchSpanProcessor(zipkin_exporter) tracer_provider.add_span_processor(span_processor) # Set the global TracerProvider trace.set_tracer_provider(tracer_provider) # Get a tracer and create a span tracer = trace.get_tracer(__name__) with tracer.start_as_current_span("my-operation"): print("Hello from OpenTelemetry with Zipkin!") print(f"Traces sent to Zipkin endpoint: {zipkin_endpoint}")
Debug
Known issues
deprecatedThe OpenTelemetry project is deprecating the Zipkin exporter specification in favor of native OTLP support, as Zipkin now supports OTLP ingestion directly. The specification was deprecated in December 2025.
fix
Migrate to using the OpenTelemetry Protocol (OTLP) exporter (`opentelemetry-exporter-otlp`) and configure your Zipkin backend to ingest OTLP directly. Existing stable Zipkin exporters will receive security patches and critical bug fixes until at least December 2026.
affects: All versions (spec deprecated December 2025)
gotchaWhen using the `opentelemetry-exporter-zipkin` alongside `py-zipkin` (an older, unrelated Python Zipkin library), you might encounter Protobuf definition conflicts, leading to `TypeError: Couldn't build proto file into descriptor pool!`.
fix
Avoid installing both `opentelemetry-exporter-zipkin` and `py-zipkin` in the same environment. If you need both, ensure they are isolated (e.g., in separate virtual environments) or migrate away from `py-zipkin` to use OpenTelemetry exclusively for tracing.
affects: All versions when `py-zipkin` is also installed.
gotchaThe exporter expects a running Zipkin collector. If the collector is unavailable or the endpoint is incorrect, traces will not be exported. While SDK span processors generally catch and log export exceptions, repeated connection failures can indicate a misconfiguration.
fix
Verify that the Zipkin collector is running and accessible from your application's host. Check the `OTEL_EXPORTER_ZIPKIN_ENDPOINT` environment variable or the `endpoint` parameter in `ZipkinSpanExporter` for correctness. Ensure network connectivity (e.g., firewall rules, host IP).
affects: All versions
Upgrade
Version history
1.42.1latest on PyPI · released May 21, 2026
Audit
Dependencies
opentelemetry-sdkrequiredProvides the core OpenTelemetry SDK components, including `TracerProvider` and `BatchSpanProcessor`, necessary for managing and processing spans before export.
opentelemetry-apirequiredProvides the OpenTelemetry API interfaces for creating traces and spans.
Agent activity
26 hits · last 30 days
node
22
OpenAI (training)
2
Resources
opentelemetry-exporter-zipkin — pip install opentelemetry-exporter-zipkin · libregistry