Skip to content

Conversation

@cjwatson
Copy link
Contributor

Anything with a suitable collect method will do: for instance, it's
sometimes useful to be able to define a class whose collect method
yields all metrics from a registry whose names have a given prefix, and
such a class doesn't need to inherit from CollectorRegistry.

We require Python >= 3.9 now, so there's no reason to avoid this any
more.

Signed-off-by: Colin Watson <cjwatson@debian.org>
Anything with a suitable `collect` method will do: for instance, it's
sometimes useful to be able to define a class whose `collect` method
yields all metrics from a registry whose names have a given prefix, and
such a class doesn't need to inherit from `CollectorRegistry`.

Signed-off-by: Colin Watson <cjwatson@debian.org>
Copy link
Member

@csmarchbanks csmarchbanks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see that old comment addressed.

@csmarchbanks csmarchbanks merged commit 13df124 into prometheus:master Nov 26, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants