Is your feature request related to a problem? Please describe.
We are currently writing a Prometheus Exporter using your library. It exposes a lot of metrics, and we cannot find a way to reliably & easily see all metrics available. We'd like to have it so we can expose it in our project (e.g. a METRICS.md file), it would be useful for us and for users of the exporter.
Describe the solution you'd like
After digging, I found out that gathering metrics with Prometheus::gather()filters out all metrics that are empty. And that this behaviour is for all registries.
Proposed solution would be to have a function or method that can fetch all metrics (name, labels, description & type) registered in a Registry, without filtering whether it's empty or not. It could introduce a new struct similiar to MetricFamily where it hasn't the ability to get or set the metric in it. This solution would introduce ability to users to work with registered metrics "raw".
Describe alternatives you've considered
Using prom2json with some custom made script to generate markdown/json
Hello :wave: !
Is your feature request related to a problem? Please describe.
We are currently writing a Prometheus Exporter using your library. It exposes a lot of metrics, and we cannot find a way to reliably & easily see all metrics available. We'd like to have it so we can expose it in our project (e.g. a
METRICS.md
file), it would be useful for us and for users of the exporter.Describe the solution you'd like
After digging, I found out that gathering metrics with
Prometheus::gather()
filters out all metrics that are empty. And that this behaviour is for all registries.Proposed solution would be to have a function or method that can fetch all metrics (name, labels, description & type) registered in a Registry, without filtering whether it's empty or not. It could introduce a new struct similiar to
MetricFamily
where it hasn't the ability to get or set the metric in it. This solution would introduce ability to users to work with registered metrics "raw".Describe alternatives you've considered
prom2json
with some custom made script to generate markdown/jsonAdditional context
I'd be happy to contribute ;D