tokio-rs/tracing

Application level tracing for Rust.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 7 minutes ago
Added to GitGenius on September 9th, 2026
Created on January 11th, 2019
Open Issues & Pull Requests: 886 (+0)
GitHub issues: Enabled
Number of forks: 930
Total Stargazers: 6,873 (+0)
Total Subscribers: 53 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 23.5 hours
Mean response time: 81.9 days
90th percentile: 211.5 days
Tracked items: 167

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 94% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. Only 2% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 145
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 802 days
Stale 30+ days: 141
Stale 90+ days: 133

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 1
Events in 7 days: 1

Top labels

  • crate/subscriber (11)
  • kind/bug (7)
  • kind/feature (5)
  • crate/core (4)
  • crate/tracing (3)
  • needs/design (3)
  • crate/appender (2)
  • good first issue (2)

Detailed Description

Tracing is a framework for instrumenting Rust programs to collect structured, event-based diagnostic information.

Tracing addresses the need for application-level diagnostics in Rust by providing a system to emit and collect trace events through a subscriber architecture. Rather than requiring a specific logging implementation, the framework defines a contract between instrumentation points in code and subscriber implementations that decide how to handle those events. Libraries emit trace data using macros and types from the tracing crate, while applications install a subscriber to actually collect and process that data. This separation allows libraries to remain agnostic about how their diagnostics are consumed, and applications to choose or swap subscribers without modifying library code.

Tracing suits any Rust project needing structured diagnostics beyond simple logging. Applications should use tracing-subscriber to install a subscriber implementation, such as the fmt module which provides reasonable defaults for logging traces to standard output. Libraries should depend only on the tracing crate itself and emit instrumentation without installing a global subscriber, avoiding conflicts with application-level configuration. The framework does not require the Tokio runtime, though it is maintained by the Tokio project. For asynchronous code, the #[instrument] attribute macro is the preferred method for tracing async functions, as it correctly handles the span lifetime relative to future polling rather than future completion.

The project maintains multiple branches for different versions of its core crates, with the main branch serving as the default for crates.io releases. Development activity shows sustained engagement with both the framework's core design and its ecosystem of subscriber implementations. The project provides comprehensive documentation covering the distinction between library and application usage patterns, detailed guidance on tracing asynchronous code, and clear examples of subscriber configuration and instrumentation.