On this page
Overview
tracing is a framework for structured application diagnostics in Rust. Spans and events represent temporal and causal relationships so execution flow remains observable even when asynchronous tasks are multiplexed on shared threads.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Record structured fields on spans and events
tracing goes beyond textual logs by representing spans with lifetimes and events that occur within them. Typed fields can carry request IDs, operation data, and other context through diagnostic output.
Sources: [2]
Choose collection, formatting, and filtering through Subscribers
The tracing instrumentation API is separated from Subscriber implementations. Applications can use tracing-subscriber formatting and filtering or compose other Layers and collectors without changing library instrumentation.
Sources: [2]
Best fit
Fits asynchronous Rust backends tracing request flows and concurrent tasks
The #[instrument] attribute and Future::instrument attach spans correctly to asynchronous work. tracing is maintained by the Tokio project but does not require the Tokio runtime.
Sources: [2]
Before adoption
Handle async span guards correctly and keep 0.1 separate from unreleased 0.2 work
Holding a Span::enter guard across async suspension can produce incorrect traces, so async code should use #[instrument] or Future::instrument. Stable tracing 0.1.44 declares Rust 1.65 as its MSRV, while the v0.2.x branch is an unreleased development line.
Official sources
- [1]tokio-rs/tracing — GitHub repository(2026-10-06)
- [2]tracing 0.1.44 — README(2026-10-06)
- [3]tracing 0.1.44 — Cargo.toml(2026-10-06)
- [4]tracing 0.1.44 — CHANGELOG(2026-10-06)
Supplemental curator note
tracing is designed for structured execution context rather than plain log strings. Libraries should emit instrumentation without installing a global Subscriber, leaving applications to choose formatting, filtering, and export behavior.
Try it in 3 steps
- 1
Clone the reviewed tracing release
Clone the reviewed tracing 0.1.44 tag. Rust 1.65 or newer and Cargo are required.
git clone --depth 1 --branch tracing-0.1.44 https://github.com/tokio-rs/tracing.git && cd tracing - 2
Enter the official examples package
Move to the official examples package containing the tracing-subscriber fmt example.
cd examples - 3
Emit structured trace output
Run the official fmt example and inspect structured fields attached to spans and events in console output.
cargo run --example fmt
Growth
Growth trends · Last 30 days
6,909 Stars
Trend data is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- diagnostics
- logging
- logging-and-metrics
- logging-facade
- logging-library
- rust
- rust-lang
- tracing
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- reqwest11,864 Stars
2 shared tag(s) · 1 shared category(s) · Same language
use async or blocking Rust HTTP clients with JSON, TLS, proxies, and multipart support
Rust - Serde10,861 Stars
2 shared tag(s) · 1 shared category(s) · Same language
decouple Rust data types from formats through shared Serialize and Deserialize traits
Rust - SeaORM9,914 Stars
2 shared tag(s) · 1 shared category(s) · Same language
manage asynchronous queries, relations, and migrations with a relational ORM for Rust
Rust - Tower4,315 Stars
2 shared tag(s) · 1 shared category(s) · Same language
compose reusable Rust networking middleware with Service and Layer
Rust - redis-rs4,258 Stars
2 shared tag(s) · 1 shared category(s) · Same language
connect Rust applications to Redis and Valkey with synchronous or asynchronous clients
Rust - Lapin1,237 Stars
2 shared tag(s) · 1 shared category(s) · Same language
connect Rust services to RabbitMQ over AMQP 0-9-1 with runtime-agnostic async APIs
Rust
Report incorrect information
Tell us if any listing information is incorrect or outdated.