https://github.com/danipopes/tracing-samply
Tracing subscriber layer for samply
https://github.com/danipopes/tracing-samply
debugging events log logging logs perf profiling samply traces tracing
Last synced: 5 months ago
JSON representation
Tracing subscriber layer for samply
- Host: GitHub
- URL: https://github.com/danipopes/tracing-samply
- Owner: DaniPopes
- License: apache-2.0
- Created: 2025-12-20T02:23:51.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-12-20T20:47:43.000Z (6 months ago)
- Last Synced: 2025-12-22T12:18:54.411Z (6 months ago)
- Topics: debugging, events, log, logging, logs, perf, profiling, samply, traces, tracing
- Language: Rust
- Homepage:
- Size: 115 KB
- Stars: 19
- Watchers: 0
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
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:
See also: [mstange/samply#349](https://github.com/mstange/samply/issues/349)
### [Example Profile](https://share.firefox.dev/4jgig5C)

## Usage
```rust
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](LICENSE-APACHE) or [MIT license](LICENSE-MIT) at your option.
[`tracing`]: https://docs.rs/tracing
[`tracing-subscriber`]: https://docs.rs/tracing-subscriber
[`samply`]: https://github.com/mstange/samply