Skip to content

Add method to allow PrometheusClient to register additional metrics#73

Merged
deadlycoconuts merged 3 commits into
caraml-dev:mainfrom
deadlycoconuts:expose_prometheus_client_maps
Jan 4, 2023
Merged

Add method to allow PrometheusClient to register additional metrics#73
deadlycoconuts merged 3 commits into
caraml-dev:mainfrom
deadlycoconuts:expose_prometheus_client_maps

Conversation

@deadlycoconuts
Copy link
Copy Markdown
Collaborator

@deadlycoconuts deadlycoconuts commented Dec 13, 2022

Context

This PR introduces an additional method to the PrometheusClient to allow the registration of additional metrics after the prior creation of a PrometheusClient object (the existing InitPrometheusMetricsCollector function creates a new PrometheusClient object and registers metrics immediately).

This change is needed as part of a series of other changes to the allow the XP's treatment service plugin to register additional metrics on the Turing Router's PrometheusClient (see caraml-dev/turing#302 and caraml-dev/xp#54 for more information).

@deadlycoconuts deadlycoconuts self-assigned this Dec 13, 2022
@deadlycoconuts deadlycoconuts force-pushed the expose_prometheus_client_maps branch from d27d7a9 to 9a452b9 Compare December 15, 2022 07:18
@deadlycoconuts deadlycoconuts changed the title Make fields of PrometheusClient public Add method to allow PrometheusClient to register additional metrics Dec 15, 2022
Comment thread api/pkg/instrumentation/metrics/prometheus.go Outdated
Comment thread api/pkg/instrumentation/metrics/prometheus.go Outdated
Comment thread .github/workflows/ci-pipeline.yml
@deadlycoconuts deadlycoconuts marked this pull request as ready for review January 3, 2023 01:56
Copy link
Copy Markdown
Collaborator

@krithika369 krithika369 left a comment

Choose a reason for hiding this comment

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

LGTM!

@deadlycoconuts
Copy link
Copy Markdown
Collaborator Author

Thanks a lot for the quick review! 🙏 Will be merging this! 🚀

@deadlycoconuts deadlycoconuts merged commit 549dbdb into caraml-dev:main Jan 4, 2023
@deadlycoconuts deadlycoconuts deleted the expose_prometheus_client_maps branch January 5, 2023 03:24
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