tracing-samply

Crates.iotracing-samply
lib.rstracing-samply
version0.1.5
created_at2025-12-20 02:57:57.068859+00
updated_at2025-12-20 20:47:40.274528+00
descriptionTracing subscriber layer for samply
homepage
repositoryhttps://github.com/DaniPopes/tracing-samply
max_upload_size
id1995915
size127,247
(DaniPopes)

documentation

README

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.

Commit count: 0

cargo fmt