Sentry Metrics for Rust
https://develop.sentry.dev/sdk/telemetry/metrics/
Add support for Sentry Metrics to the Rust SDK!
This will enable users to record counters, gauges, and distributions.
- Define the Metrics Protocol and
trace_metricenvelope type in the SDK. - Add the Public API (SDK options and methods) as per the docs.
- Make sure the the SDK follow the documented behavior.
- Attach default attributes and optional user attributes to the SDK as per docs.
- Follow requirements for rate limiting, buffering, batching & flushing and build in measures to prevent excessive memory usage.
For general feedback & questions about Sentry Metrics use this GH discussion; for Rust SDK specific feedback & questions use the comment functionality on this GH issue.
We should consider what are the most widely adopted crates for capturing metrics and consider building integrations for those, as that way it will be much more easier for this to see adoption. There's for example https://crates.io/crates/metrics and there's also https://crates.io/crates/cadence which we integrated with during the old metrics beta, even though I believe our new protocol won't be compatible with the latter.
The opentelemetry crate also offers metrics: https://docs.rs/opentelemetry/latest/opentelemetry/metrics/index.html
Integration with that would be fantastic!
I am very interested in adopting this. Happy to help with any early testing you've got.