Skip to content

Permit subclassing of MetricsHandler#339

Merged
brian-brazil merged 1 commit intoprometheus:masterfrom
jeanralphaviles:subclass_metrics_handler
Nov 7, 2018
Merged

Permit subclassing of MetricsHandler#339
brian-brazil merged 1 commit intoprometheus:masterfrom
jeanralphaviles:subclass_metrics_handler

Conversation

@jeanralphaviles
Copy link
Copy Markdown
Contributor

@brian-brazil

Changes MetricsHandler.factory from a staticmethod to a classmethod to be able to determine the correct subclass to return. This way if a user wants to extend the behavior of their MetricsHandler, they don't have to reimplement the factory() method.

Changes MetricsHandler.factory from a staticmethod to a classmethod to
be able to determine the correct subclass to return. This way if a user
wants to extend the behavior of their MetricsHandler, they don't have to
reimplement the factory() method.

Signed-off-by: Jean-Ralph Aviles <jeanralph.aviles@gmail.com>
@brian-brazil brian-brazil merged commit a50f3e4 into prometheus:master Nov 7, 2018
@brian-brazil
Copy link
Copy Markdown
Contributor

Thanks!

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