-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Micrometer for http requests: URI templating not working with interfaces #21034
Comments
/cc @ebullient |
Thanks for opening this issue. In the meanwhile, you can use matchPattern to force usage of the templated URI. |
Exactly, there is still a way out of it, but was really surprise it was not always working especially with the work done in #17676, unfortunately I did not have to dig more to find where the missing part comes from exactly. |
I may not be chasing interfaces correctly for path annotation detection. Thanks for the reproducer, that helps a lot. ;) |
What is the current status of resolving this issue? This issue is affecting us for now, since we use micrometer for metrics and are getting WARNING's regarding "number of tags for http.server.requests". |
You should set the match pattern as that gets you out of trouble right now, there are some things I'm waiting for to fix this issue, but the match pattern will continue to work regardless (at some future point, you may not need it, but it will work, so.. ) |
@ebullient Thanks for the confirmation. In our case, the application has three path parameters. Let's say: Param2 has limited set of values and will never lead to high cardinality situations. |
At the moment, no. I was making some tradeoffs re: cost because this comparison is done with every request measurement. I could add an option to use replaceAll rather than flat assignment... |
Can you please elaborate what you meant by : |
Line 59 in 5eb3169
From there. I just assign the match pattern value at the moment, but the pattern is a proper regex, I could allow use of replaceAll as well (which would allow you to use matching groups) |
I want to make sure, that I have explained the problem correctly. |
Right. |
When will there be a proper solution to the problem that micrometer doesn't properly recognize http request uri's? Thanks in advance! |
Is this still an issue? If it is, can someone attach a reproduce that uses the latest version of Quarkus so I can look into it? Thanks |
Closing for lack of feedback |
Describe the bug
Hello,
While integrating Micrometer into our application, checking the http metrics and more specifically the URI, I could see that in some case it was not templatized.
It seems to come from the fact that we used in some case an API instead of annotating the class directly and in this case it seems the @path annotation is not used to resolve the template URI.
Best Regards
Expected behavior
Have a tag with the template URI instead of the whole URI
Actual behavior
Full URI is set as metric tag.
How to Reproduce?
micrometer_reproducer.zip
This is a small reproducer that contains the two versions of a dummy resource, one usin an API, the other no to highlight the difference.
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: