Closed djhworld closed 7 months ago
This adds a clause to use Registry::default() if name_in_metrics is empty
Registry::default()
name_in_metrics
At the moment using the with_prefix method, the metrics that get rendered ends up looking like this: _my_metric because prefix is Option https://github.com/prometheus/client_rust/blob/master/src/registry.rs#L62
with_prefix
_my_metric
prefix
Option
Using Registry::default() will set prefix to None so that metrics get rendered without the leading underscore.
None
This adds a clause to use
Registry::default()
ifname_in_metrics
is emptyAt the moment using the
with_prefix
method, the metrics that get rendered ends up looking like this:_my_metric
becauseprefix
isOption
https://github.com/prometheus/client_rust/blob/master/src/registry.rs#L62Using
Registry::default()
will set prefix toNone
so that metrics get rendered without the leading underscore.