otel-kit
otel-kit is the repository for three Rust crates that cover
different observability boundaries:
otel-initinitializes OpenTelemetry providers and tracing subscribers;tracing-otelprovides shared HTTP tracing utilities and an opinionated logging/bootstrap facade;axum-oteladapts the shared HTTP span behavior to Axum andtower-http::TraceLayer.
Choose the smallest crate that owns the behavior your application needs. An
Axum application can use axum-otel with its own subscriber, while an
application that wants the repository’s complete logging setup can combine it
with tracing-otel’s logger or env feature. Provider-only users can depend
directly on otel-init.
The workspace packages are currently version 0.33.1. Cargo.toml declares
Rust 1.92.0 as the minimum supported Rust version. The repository toolchain may
pin a newer compiler for local development.
Where to start
- Getting started — install the right crates and build a minimal application.
- Crates — choose the smallest crate for each observability responsibility.
- Cargo features — keep optional dependencies and capabilities explicit.
- Comparison with
axum-tracing-opentelemetry— choose between focused request middleware and this workspace’s broader observability setup. - OTLP export and lifecycle — configure exporters and shut providers down safely.
- HTTP span attributes — understand emitted fields before writing dashboards or alerts.
The complete type-level references are on
docs.rs for tracing-otel,
docs.rs for otel-init, and
docs.rs for axum-otel.