The Rust OpenTelemetry client.
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.
use opentelemetry::{api::TracerGenerics, global, sdk};
fn main() {
global::set_provider(sdk::Provider::default());
global::tracer("component-a").with_span("foo", |_span| {
global::tracer("component-b").with_span("bar", |_span| {
global::tracer("component-c").with_span("baz", |_span| {
})
})
});
}
See the opentelemetry-example-app for a complete example.
See the contributing file.
OpenTelemetry Rust is under active development. Below is the release schedule for the Rust library. The first version of a release isn't guaranteed to conform to a specific version of the specification, and future releases will not attempt to maintain backwards compatibility with the alpha release.
Component | Version | Target Date |
---|---|---|
Tracing API | Alpha | March 31 2020 |
Tracing SDK | Alpha | April 31 2020 |
Metrics API | Alpha | March 31 2020 |
Metrics SDK | Alpha | April 30 2020 |
Zipkin Trace Exporter | Alpha | Unknown |
Jaeger Trace Exporter | Alpha | April 30 2020 |
Prometheus Metrics Exporter | Alpha | April 30 2020 |
Context Propagation | Alpha | April 30 2020 |
OpenTracing Bridge | Alpha | Unknown |
OpenCensus Bridge | Alpha | Unknown |