Rust

Embed
Preview of the card
<a href="https://forumulate.com/p/watchtower/docs/profilers-rust"><img src="https://forumulate.com/api/public/orgs/watchtower/spaces/docs/pages/889a8769-50c7-41aa-ac8a-1992289d5874/social-card.svg?v=3e7ae33eec8b" alt="Rust" width="600" height="315"></a>

Use pprof-rs (Apache-2.0) in-process and push the pprof it writes. Sample types: cpu. Span links: no. Native frames symbolize from uploaded debug files (wtctl debug-files upload).

let guard = pprof::ProfilerGuardBuilder::default().frequency(99).build()?;
// ... later
let report = guard.report().build()?;
let mut buf = Vec::new();
report.pprof()?.write_to_vec(&mut buf)?; // protobuf; gzip before upload
gzip -c cpu.pb > cpu.pb.gz
wtctl profile upload cpu.pb.gz --service checkout --version 1.4.2 --format pprof
Updated