Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus Receiver: Unregister self-observability metrics on Shutdown #32202

Merged
merged 4 commits into from
Apr 5, 2024

Conversation

dashpole
Copy link
Contributor

@dashpole dashpole commented Apr 5, 2024

Description:

Prometheus libraries will currently fail to initialize if they are called more than once for the same component name. This is because it attempts to register the same self-observability metrics, which isn't allowed by the Prometheus client. To work around this, Unregister all self-observability metrics during Shutdown.

This updates the prometheus dependency to an unreleased version to pull in prometheus/prometheus#13897 and prometheus/prometheus#13896.

Link to tracking Issue:

Fixes #32123

Testing:

Unit test added.

Documentation:

N/A

cc @cpheps @djaglowski

@dashpole dashpole force-pushed the prom_unregister_metrics branch from bddb719 to 4f8dfe1 Compare April 5, 2024 18:17
@dashpole dashpole added the bug Something isn't working label Apr 5, 2024
@djaglowski djaglowski merged commit 191c2c9 into open-telemetry:main Apr 5, 2024
147 checks passed
@github-actions github-actions bot added this to the next release milestone Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prometheus Receiver: failed to register service discovery metrics
5 participants