metrics-rs / metrics

A metrics ecosystem for Rust.
MIT License
1.11k stars 156 forks source link

Support set metrics #479

Closed Dav1dde closed 5 months ago

Dav1dde commented 5 months ago

There is currently no way to emit set metrics via metrics-rs.

For example, statsd and Sentry support sets natively.

tobz commented 5 months ago

This is something I'm not looking to support with metrics, as it can be more easily handled by applications themselves, and tracked directly as a gauge.

Dav1dde commented 5 months ago

How would the application track a set as a gauge? This does not work for anything distributed.

tobz commented 5 months ago

You're right: it would only be aggregated at the application-level, so perhaps by pod or by host. This is also how most metrics platforms that "support" StatsD (and thus sets) do it, though: They don't natively send the set data to the backend and do global aggregation, they just roll up the values locally and emit a gauge.

Dav1dde commented 5 months ago

That's unfortunate for all platforms that do support proper sets. But fair enough.