Skip to main content
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.

Why OpenTelemetry Rust?

The Rust implementation of OpenTelemetry provides a performant, type-safe SDK for instrumenting your applications with observability capabilities. Export and analyze telemetry data using Prometheus, Jaeger, and other observability tools. Key capabilities:
  • Traces - Distributed tracing to track requests across services
  • Metrics - Counters, histograms, gauges, and observable instruments
  • Logs - Structured logging with context propagation
  • Exporters - OTLP, Prometheus, Jaeger, Zipkin, and stdout
  • Context propagation - W3C Trace Context, baggage, and custom propagators

Signal status

Signal/ComponentStatus
ContextBeta
BaggageRC
PropagatorsBeta
Logs APIStable
Logs SDKStable
Logs OTLP ExporterRC
Logs Appender (Tracing)Stable
Metrics APIStable
Metrics SDKStable
Metrics OTLP ExporterRC
Traces APIBeta
Traces SDKBeta
Traces OTLP ExporterBeta

Getting started

Installation

Add OpenTelemetry to your Rust project with Cargo

Quickstart

Get up and running with a working example in minutes

API Reference

Explore the complete API documentation on docs.rs

Examples

Browse real-world examples for traces, metrics, and logs

Core crates

The OpenTelemetry Rust implementation is distributed across several crates:

opentelemetry

Core API crate containing Context, Baggage, Propagators, and APIs for Logging, Metrics, and Tracing

opentelemetry-sdk

Official SDK implementation with Logging SDK, Metrics SDK, Tracing SDK, and propagator implementations

opentelemetry-otlp

Export telemetry in OTLP format to collectors, backends like Jaeger and Prometheus, or vendor endpoints

opentelemetry-stdout

Export logs, metrics, and traces to stdout for learning and debugging

Appenders and integrations

OpenTelemetry Rust does not provide a new logging API. Instead, it bridges existing logging libraries to the OpenTelemetry log data model.
Available log appenders:
  • opentelemetry-appender-tracing - Bridge for the tracing crate (recommended for new projects)
  • opentelemetry-appender-log - Bridge for the log crate
Additional exporters and propagators:
  • opentelemetry-prometheus - Prometheus metrics exporter
  • opentelemetry-zipkin - Zipkin trace exporter
  • opentelemetry-jaeger-propagator - Jaeger propagation format
  • opentelemetry-semantic-conventions - Standard names and semantic conventions

Supported Rust versions

Minimum supported Rust version: 1.75
OpenTelemetry is built against the latest stable release. 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.49, the minimum supported version will not be increased past 1.46. Increasing the minimum supported compiler version is not considered a semver breaking change.

Community

Join the OpenTelemetry Rust community: The meeting is open to all, regardless of experience level. Everyone is welcome to participate!

Next steps

1

Install OpenTelemetry

Follow the installation guide to add the necessary crates to your project
2

Try the quickstart

Get hands-on with a complete working example that demonstrates traces, metrics, or logs
3

Choose your exporter

Select an exporter based on your observability backend (OTLP, Prometheus, Jaeger, etc.)
4

Instrument your code

Add instrumentation to your application code to emit telemetry signals

Build docs developers (and LLMs) love