opentelemetry 0.9.0

A metrics collection and distributed tracing framework
Documentation

OpenTelemetry-Rust

Crates.io: opentelemetry Documentation Crates.io GitHub Actions CI Gitter chat

The Rust OpenTelemetry implementation.

OpenTelemetry provides a single set of APIs, libraries, agents, and collector services to capture distributed traces and metrics from your application. You can analyze them using Prometheus, Jaeger, and other observability tools.

Getting Started

use opentelemetry::{api::trace::Tracer, exporter::trace::stdout};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Create a new instrumentation pipeline
    let (tracer, _uninstall) = stdout::new_pipeline().install();

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

    Ok(())
}

See the examples directory for different integration patterns.

Contributing

See the contributing file.