-
Notifications
You must be signed in to change notification settings - Fork 106
Description
Is there an elegant way of combining multiple registries in a single encode output?
An example of a use case would be writing an exporter for metrics from an external system, as opposed to the own application's metrics.
The idea is that new metric families would be created and populated on each scrape. But there could also be exporter-related metrics that would be constant between scrapes, such as an info, etc.
One way of doing this right now would be to register the exporter's metrics to a new, per-scrape Registry, together with the scrape metrics and encode that. This approach seems somewhat verbose.
A more ergonomic approach would be for the encode function to take some iterable of Families and encode that, which is basically what the Registry is from its point of view.