Is your feature request related to a problem? Please describe.
I want to generate a Markdown file that documents all metrics my application emits. Registry already contains everything I need: metrics names, types, descriptions, labels.
However, the only way to access this information is Registry::gather() method, and gather() currently will filter out empty MetricFamilies.
This filtering is fine when dumping metrics values, but when generating documentation before any values were written - the labelled metrics (e.g. GaugeVec) are skipped and I cannot access their information.
Describe the solution you'd like
- Add
Registry::all_registered() method that doesn't filter
Describe alternatives you've considered
I'm considering to add a wrapper trait on top of Registry that will allow me to gather all metrics from subsystems of mine. This approach however will not work with any external libraries that won't have this trait.
Is your feature request related to a problem? Please describe.
I want to generate a Markdown file that documents all metrics my application emits.
Registryalready contains everything I need: metrics names, types, descriptions, labels.However, the only way to access this information is
Registry::gather()method, andgather()currently will filter out emptyMetricFamilies.This filtering is fine when dumping metrics values, but when generating documentation before any values were written - the labelled metrics (e.g.
GaugeVec) are skipped and I cannot access their information.Describe the solution you'd like
Registry::all_registered()method that doesn't filterDescribe alternatives you've considered
I'm considering to add a wrapper trait on top of
Registrythat will allow me to gather all metrics from subsystems of mine. This approach however will not work with any external libraries that won't have this trait.