Skip to content

CollectorRegistry should be just another type of MultiCollector #903

Open
@zorba128

Description

@zorba128

Notice CollectorRegistry effectively is just yet another type (subclass) of MultiCollector.
It has same responsibility - to produce MetricsSnapshots, just method is named scrape() instead of collect().
Even the filtering api needs to match between one and another (see that ScrapeRequest leaked down into MultiCollector). Also it aggregates list of prometheusNames, its just not exposed.

I dont think this is coincidence...

With this change one could use registry at intermediate levels to compose simple collectors (like gauges, etc) to bigger collectors. And in the end composite of composites could be used as source for http metrics server.

marcin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions