metrics-rs / metrics

A metrics ecosystem for Rust.
MIT License
1.1k stars 151 forks source link

chore: add global preifix for recorder #359

Closed paomian closed 1 year ago

tobz commented 1 year ago

This should already be possible utilizing the prefix layer from metrics-util.

I realize that the Prometheus exporter already supports setting global labels, but the exporter is already at the limit of customization that I'm comfortable with, and I want to encourage more usage of the existing utilities (such as layers) to avoid exporter feature fragmentation.

Happy to re-open the PR if you believe there's a compelling reason why this should exist at the exporter level.