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

Remove meters from child registries using mapped Id #2362

Merged
merged 1 commit into from Dec 8, 2020

Conversation

shakuzen
Copy link
Member

Child registries may have MeterFilter configured that alter the Id of meters when registered. In this case, calling remove with the Id from the CompositeMeterRegistry will not match unless it also has the same MeterFilter configured. The behavior of the remove method has fluctuated as these cases come to light. This adds public API for removing a meter with its pre-mapped Id and clarifies the behavior in the JavaDoc of all remove methods. CompositeMeterRegistry can now use this new API to have the expected behavior.

Resolves gh-2354

Child registries may have a `MeterFilter` configured that alter the Id of meters when registered. In this case, calling `remove` with the Id from the `CompositeMeterRegistry` will not match unless it also has the same `MeterFilter` configured. The behavior of the `remove` method has fluctuated as these cases come to light. This adds public API for removing a meter with its pre-mapped Id and clarifies the behavior in the JavaDoc of all `remove` methods. `CompositeMeterRegistry` can now use this new API to have the expected behavior.

Resolves micrometer-metricsgh-2354
@shakuzen shakuzen merged commit 178ad9d into micrometer-metrics:1.3.x Dec 8, 2020
@shakuzen shakuzen deleted the remove-with-filters branch December 8, 2020 10:50
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.

None yet

2 participants