-
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 return 404 instead of 406 #15093
Comments
/cc @ebullient |
If you drop the accept header, it will work properly (prometheus w/ text/plain), which also would work fine with any microprofile metrics. If you want the fallback of the json endpoint: I'll have to see how/why the 404 is being returned, though I can understand the reasoning for why it is. This is being done w/ Vert.x Web (lower level), prometheus is registered first for only text/plain, and the json exporter (if enabled) is registered second for only application/json. The handler needed for that request is not found (404 is accurate), though 406 is the more nuanced answer. This may be a Vert.x ask.. |
@ebullient I am pretty sure that Reactive Routes (which is just a thin layer of Vert.x Web) properly handles this case. |
Y.. this is may be in the router that was added for |
I'm not an advocate of 406 over 404. I'm re Just notice the behavior when doing some tests moving from the smallrye extension to micrometer. And my tests were using the accept json header. I struggle a little bit why the endpoint fails. And with the recent move to /q, it adds some confusion as the guide is not up to date regarding default value shown in the configuration section at the end (still refer to /metrics) |
Describe the bug
With
doing a request like
returns 404
Expected behavior
The endpoint actually exists but cannot fulfill the Accept header. The response should be 406 Not acceptable.
Actual behavior
Returns 404
To Reproduce
Environment (please complete the following information):
uname -a
orver
: Linux b5bdbb43a9f9 5.4.72-microsoft-standard-WSL2 Switch to the Maven distributed copy of the SubstrateVM annotations #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 x86_64 x86_64 GNU/Linuxjava -version
: openjdk version "11.0.9.1" 2020-11-04 LTSmvnw --version
orgradlew --version
): Apache Maven 3.6.2 (Red Hat 3.6.2-5)Additional context
With MP metrics endpoint, the
accept: application/json
header is recognize and served appropriately. Having 406 instead of 404 can help diagnose what is wrong when migrating to micrometer.The text was updated successfully, but these errors were encountered: