cloudflare / foundations

Cloudflare's Rust service foundations library.
https://blog.cloudflare.com/introducing-foundations-our-open-source-rust-service-foundation-library
BSD 3-Clause "New" or "Revised" License
1.25k stars 51 forks source link

Provide foundations::telemetry::metrics::with_registry() #65

Open bobrik opened 7 hours ago

bobrik commented 7 hours ago

Currently there is no way to enable third party libraries to register metrics, which is not great. With this new method those libraries can get a Registry to register their metrics when they initialize, while still giving the end user control over prefixes and external labels.