-
Notifications
You must be signed in to change notification settings - Fork 10
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
When running in Chrome, it shows only text/plain, while with CURL it shows application/openmetrics-text #22
Comments
The extension gets the current document request from Chrome and checks if its content type is either "application/openmetrics-text" (or "text/plain" and matching the path names defined). So basically you'd have to take every request matching the "text/plain" content type and try to request the same document as "application/openmetrics-text" again and work from there, which would be quite an overhead. Also, the content type information you get in the extension itself isn't really great. Prometheus sends So at the moment, I'm not really sure how to implement this check in a sensible way, but I'm open to suggestions. As a short term solution, there seem to be Chrome extensions which can override headers. I just did a quick Google search on "chrome force content type", but haven't looked at any extension in particular. Also, I haven't worked with exemplars yet, could you please provide some sort of example output so I can check if the highlighting still works correctly? |
Here's an example of a metrics with the exemplar. You'll see it after the hash:
About the content type: When writing this, I didn't have the response content type in mind, but the accepted types. My browser currently sends something like the following. I wonder if this extension could add
|
Thanks for the example! I'm lookin into modifying the request headers, might take a little while. |
I've been playing around with the Ref: |
I'm running a Quarkus application with a Prometheus endpoint which will shows the "old" Prometheus format without exemplars when accessing the metrics endpoint in the Chrome browser, and it will show the OpenMetrics output when running it via CURL.
I assume that the content negotiation where Chrome sends among other accepted format "text/html" somehow let's the application go down the path of the old format, while when CURL doesn't send any headers, it chooses the new format.
So I wonder: Can I (or this extension) have Chrome send "application/openmetrics-text" as a supported mime type, so that I will see exemplars in the Chrome window?
The text was updated successfully, but these errors were encountered: