-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
[plugins/prometheus] Fix registry metrics duplication #2217
Conversation
🦋 Changeset detectedLatest commit: 5841b48 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
💻 Website PreviewThe latest changes are available as preview in: https://587986fa.envelop.pages.dev |
54ead08
to
78d967c
Compare
78d967c
to
7849bf0
Compare
✅ Benchmark Results
|
7849bf0
to
27bbd4d
Compare
e76039a
to
0c0064c
Compare
0c0064c
to
bb3fd9f
Compare
|
@dotansimha We don't actually have any means to know if the configuration have changed or not. Even if we keep track of the previous configuration somehow and check fo the deep equality with the new config, it will most likely be always different, because of the We could add a warning if we detect that a metrics was already registered with this name, but then will have this warning every time we create a new Mesh instance when polling is enable. Do you think I should add a warning with an option to disable it explicitly ? |
Description
Is this plugin is initialized multiple times with the same registry (which can happen in the context of Mesh when polling is enabled for example).
This PR aims to fix this.
Type of change
expected)
Further comments
Current solution rely on caching Histograms with a Map to reuse them instead of creating them each time.
But this has a drawback: if the configuration of those Histograms changes, this changement will be silently ignored and the old configuration will be kept in use.