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

MicrometerHttpClientInterceptor has no outcome Tag #3790

Closed
cachescrubber opened this issue Apr 27, 2023 · 2 comments · Fixed by #3791
Closed

MicrometerHttpClientInterceptor has no outcome Tag #3790

cachescrubber opened this issue Apr 27, 2023 · 2 comments · Fixed by #3791
Labels
bug A general bug module: micrometer-core An issue that is related to our core module
Milestone

Comments

@cachescrubber
Copy link
Contributor

Describe the bug

MicrometerHttpClientInterceptor does not support the outcome tag. io.micrometer.core.instrument.binder.httpcomponents.hc5.MicrometerHttpClientInterceptor publishes to the same meter as io.micrometer.core.instrument.binder.httpcomponents.hc5.MicrometerHttpRequestExecutor - httpcomponents.httpclient.request - using a different set of tags. When prometheus is used as registry, one of the mentioned measurements are silently dropped.

Environment

  • Micrometer version 1.11.0-RC1
  • Micrometer registry prometheus
  • Java version: 17

To Reproduce
How to reproduce the bug:

Instrument a HttpAsyncClient using the MicrometerHttpClientInterceptor and an HttpClient using MicrometerHttpRequestExecutor in the same application. Export the measurements to prometheus.

Expected behavior
The outcome Tag is supported when instrumenting HttpAsyncClient using the MicrometerHttpClientInterceptor. Both instrumentations support an identical set of Tags.

Additional context
#877 will be triggered by the absence of the outcome Tag.

@shakuzen shakuzen added bug A general bug module: micrometer-core An issue that is related to our core module and removed waiting-for-triage labels Apr 27, 2023
@shakuzen shakuzen added this to the 1.11.0 milestone Apr 27, 2023
@shakuzen
Copy link
Member

Thank you for the report. It looks like we missed that instrumentation in #3732. Would you be interested in contributing a fix to add the outcome tag to MicrometerHttpClientInterceptor?

@cachescrubber
Copy link
Contributor Author

Thank you for the report. It looks like we missed that instrumentation in #3732. Would you be interested in contributing a fix to add the outcome tag to MicrometerHttpClientInterceptor?

Thanks for your quick response. I filed a fix in #3791.

shakuzen added a commit that referenced this issue Apr 27, 2023
Adds the `outcome` tag to align with the synchronous Apache Http Client instrumentation. Adds instrumentation verification tests to ensure instrumentation is in line with base expectations for all HTTP clients (this would have caught the missing `outcome` tag when we aligned on adding that previously).

Resolves gh-3790

Co-authored-by: Tommy Ludwig <8924140+shakuzen@users.noreply.github.com>
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-core An issue that is related to our core module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants