-
Notifications
You must be signed in to change notification settings - Fork 38.2k
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
ServerHttpObservationFilter does not fill pathPattern #32099
Comments
We have tests that check for this case. Can you elaborate? What's the endpoint? Can your provide a minimal sample application that reproduces the problem? |
Repro repository: https://github.com/bergerdenes/metrics-repro |
I'm sorry I can't reproduce the problem. I ran many requests on my local machine, including using benchmarking tools and I'm seeing:
Thoughts? |
My output for the same:
|
I'm only seeing That is an interesting point, though. If you believe that this is confusing, or if you'd like to have an option to disable those long task timers, please raise a Micrometer issue in order to discuss this matter with the team. The metrics handler code is managed by Micrometer directly. In light of that, I'm closing this issue. Thanks! |
@bclozel please reopen the issue. If one calls the "metrics" endpoint first then later you will see UNKNOWN for all of the API endpoints. |
That's an entirely different setup now! The application is not using Spring MVC but it's using Jersey. |
Then what is the explanation for this:
|
@bergerdenes I don't know. That's probably a bug to be reported to the Jersey instrumentation? The Spring instrumentation is not being used here. Tags are created by the Edit: Apologies, in this case the instrumentation is done by Micrometer directly. I was confused because it's also been contributed to Jersey directly. |
I have debugged into DefaultJerseyTagsProvider and the |
I think you should try disabling the Spring MVC instrumentation by excluding the You can do so by updating your application with:
If this solves the problem, you can create a Spring Boot issue to better figure out this can be better addressed. |
solved the issue, thanks for the hint. I hope it is adequate if I just create a SpringBoot issue and reference this issue here... |
as it clashes with DefaultJerseyTagsProvider, rendering Prometheus actuator output useless by showing "UNKNOWN" in the `uri` field instead of the real path pattern. This is only happening with Jersey-annotated endpoints that we use. It does work correctly with Spring-annotated endpoints, just for the record. See issues: - spring-projects/spring-framework#32099 - spring-projects/spring-boot#39294
Affects: 6.0.15, 6.1.3
This property is necessary for collecting metrics via Micrometer.
In the
org.springframework.http.server.observation.DefaultServerRequestObservationConvention
class, theprotected KeyValue uri(ServerRequestObservationContext context)
method tries to getcontext.getPathPattern()
but it is always null.The text was updated successfully, but these errors were encountered: