16 breaking releases

0.16.0 Sep 13, 2022
0.15.0 Jan 22, 2022
0.14.0 Aug 7, 2021
0.13.0 Jun 17, 2021
0.0.1 Mar 24, 2020

#8 in #jaeger

Download history 6363/week @ 2022-11-27 6862/week @ 2022-12-04 6764/week @ 2022-12-11 5178/week @ 2022-12-18 1857/week @ 2022-12-25 4916/week @ 2023-01-01 5975/week @ 2023-01-08 6125/week @ 2023-01-15 7199/week @ 2023-01-22 6829/week @ 2023-01-29 7368/week @ 2023-02-05 8120/week @ 2023-02-12 8505/week @ 2023-02-19 9437/week @ 2023-02-26 9938/week @ 2023-03-05 9830/week @ 2023-03-12

38,049 downloads per month
Used in 5 crates (4 directly)


1.5K SLoC

OpenTelemetry — An observability framework for cloud-native software.

OpenTelemetry Zipkin

Zipkin integration for applications instrumented with OpenTelemetry.

Crates.io: opentelemetry-zipkin Documentation LICENSE GitHub Actions CI Gitter chat

Documentation | Chat


OpenTelemetry is a collection of tools, APIs, and SDKs used to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior. This crate provides a trace pipeline and exporter for sending span information to a Zipkin collector for processing and visualization.

Compiler support: requires rustc 1.56+


First make sure you have a running version of the zipkin process you want to send data to:

$ docker run -d -p 9411:9411 openzipkin/zipkin

Then install a new pipeline with the recommended defaults to start exporting telemetry:

use opentelemetry::trace::Tracer;
use opentelemetry::global;

fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
    let tracer = opentelemetry_zipkin::new_pipeline().install_simple()?;

    tracer.in_span("doing_work", |cx| {
        // Traced app logic here...



For optimal performance, a batch exporter is recommended as the simple exporter will export each span synchronously on drop. You can enable the rt-tokio, [rt-tokio-current-thread] or [rt-async-std] features and specify a runtime on the pipeline builder to have a batch exporter configured for you automatically.

opentelemetry = { version = "*", features = ["rt-tokio"] }
opentelemetry-zipkin = { version = "*", features = ["reqwest-client"], default-features = false }
let tracer = opentelemetry_zipkin::new_pipeline()

Choosing an HTTP client

The HTTP client that this exporter will use can be overridden using features or a manual implementation of the HttpClient trait. By default the reqwest-blocking-client feature is enabled which will use the reqwest crate. While this is compatible with both async and non-async projects, it is not optimal for high-performance async applications as it will block the executor thread. Consider using the reqwest-client (without blocking) or surf-client features if you are in the tokio or async-std ecosystems respectively, or select whichever client you prefer as shown below.

Note that async http clients may require a specific async runtime to be available so be sure to match them appropriately.

Kitchen Sink Full Configuration

Example showing how to override all configuration options. See the ZipkinPipelineBuilder docs for details of each option.

Supported Rust Versions

OpenTelemetry is built against the latest stable release. The minimum supported version is 1.56. The current OpenTelemetry version is not guaranteed to build on Rust versions earlier than the minimum supported version.

The current stable Rust compiler and the three most recent minor versions before it will always be supported. For example, if the current stable compiler version is 1.56, the minimum supported version will not be increased past 1.46, three minor versions prior. Increasing the minimum supported compiler version is not considered a semver breaking change as long as doing so complies with this policy.


~293K SLoC