OSS TanbouSign in with GitHub

record causal async execution with structured spans and events in Rust

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
6,909
Primary language
Rust
License
MIT
Repository last updated
May 30, 2026
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.

Sources: [2][3][4]

Official sources

  1. [1]tokio-rs/tracing — GitHub repository(2026-10-06)
  2. [2]tracing 0.1.44 — README(2026-10-06)
  3. [3]tracing 0.1.44 — Cargo.toml(2026-10-06)
  4. [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. 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. 2

    Enter the official examples package

    Move to the official examples package containing the tracing-subscriber fmt example.

    cd examples
  3. 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
Check the official README

Growth

Growth trends · Last 30 days

6,909 Stars

Trend data is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • diagnostics
  • logging
  • logging-and-metrics
  • logging-facade
  • logging-library
  • rust
  • rust-lang
  • tracing
Stars
6,909
Forks
945
Watchers
53
Open issues
901
Contributors
305
Owner type
Organization
Primary language
Rust
License
MIT
Repository last updated
May 30, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?