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

MetricsRequestEventListener with @Timed(longTask=true) makes two meters #2861

Closed
shakuzen opened this issue Nov 12, 2021 · 1 comment · Fixed by #2862
Closed

MetricsRequestEventListener with @Timed(longTask=true) makes two meters #2861

shakuzen opened this issue Nov 12, 2021 · 1 comment · Fixed by #2862
Labels
bug A general bug module: micrometer-jersey An issue that is related to our jersey module
Milestone

Comments

@shakuzen
Copy link
Member

shakuzen commented Nov 12, 2021

I'm not sure this behavior was intentional. If you annotate a Resource with @Timed(longTask = true) then you will end up with a LongTaskTimer and a Timer with the same name. I would have expected just a LongTaskTimer.
/cc @mweirauch

@shakuzen shakuzen added bug A general bug module: micrometer-jersey An issue that is related to our jersey module labels Nov 12, 2021
@shakuzen shakuzen added this to the 1.7.x milestone Nov 12, 2021
shakuzen added a commit to shakuzen/micrometer that referenced this issue Nov 12, 2021
Before both a `LongTaskTimer` and `Timer` were being made because the logic to make regular timers from the `@Timed` annotation did not filter out annotations where `longTask` was `true`.

Resolves micrometer-metricsgh-2861
@shakuzen shakuzen linked a pull request Nov 12, 2021 that will close this issue
@shakuzen shakuzen modified the milestones: 1.7.x, 1.7.7 Nov 15, 2021
@shakuzen
Copy link
Member Author

shakuzen commented Dec 7, 2021

Note: ported to the Jersey instrumentation in micrometer-core with 44f8a60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A general bug module: micrometer-jersey An issue that is related to our jersey module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant