6 releases

Uses new Rust 2024

0.1.5 Dec 20, 2025
0.1.4 Dec 20, 2025

#106 in Profiling

Download history 19455/week @ 2026-01-21 18297/week @ 2026-01-28 20053/week @ 2026-02-04 20340/week @ 2026-02-11 26071/week @ 2026-02-18 29211/week @ 2026-02-25 28252/week @ 2026-03-04 31695/week @ 2026-03-11 34112/week @ 2026-03-18 33288/week @ 2026-03-25 27728/week @ 2026-04-01 34410/week @ 2026-04-08 38698/week @ 2026-04-15 39819/week @ 2026-04-22 34717/week @ 2026-04-29 38004/week @ 2026-05-06

157,896 downloads per month
Used in icechunk

MIT/Apache

105KB
194 lines

tracing-samply

A tracing-subscriber layer that bridges tracing with samply.

Currently, this only records spans as markers using samply's ad-hoc marker file format, which are then detected at runtime by samply and written to the profile.

Markers for a thread are only detected if samply is attached when the thread is created.

This crate will adapt to any changes upstream. The creator has expressed that the marker file is a temporary measure and that it will be replaced with a more robust solution in the future: https://github.com/mstange/samply/pull/143#issuecomment-2067747892

See also: mstange/samply#349

Example Profile

samply

Usage

use tracing_subscriber::prelude::*;

fn main() {
    tracing_subscriber::registry()
        // ... other layers
        .with(tracing_samply::SamplyLayer::new().unwrap())
        .init();
    
    // Your application code that uses `tracing`
}

Platform Support

Platform Status
🐧 Linux
🍎 macOS
🪟 Windows ⚠️
  • ✅ = Compiles, tested in CI, works as expected
  • ⚠️ = Compiles, but does not do anything (yet?)

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Dependencies

~1MB
~20K SLoC