You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenMetrics has been finalized and the Prometheus Java client supports the OpenMetrics data model and text scrape format since its 0.10.0 release. It would be nice if the Prometheus Actuator endpoint could respond with the Prometheus text format or the OpenMetrics text format based on the Accept header sent, using HTTP content negotiation.
I made an attempt to implement this, but I couldn't figure out a way to do HTTP content negotiation and keep the current portability of the endpoint. It already is a web-only endpoint, but it works on Jersey. Switching to a RestControllerEndpoint, I was able to achieve the right behavior, except Jersey is not supported.
A generic ReadOperation can specify the types it produces (so it rejects requests with unsupported Accept headers), but it has no access to the Accept header to change the returned content based on it. I'm not sure what the Boot team wants to do, which is why I opted to open an issue over a pull request with the above (also, I wasn't sure of an easy way to test a RestControllerEndpoint similar to how the current WebEndpoint is tested).
The text was updated successfully, but these errors were encountered:
OpenMetrics has been finalized and the Prometheus Java client supports the OpenMetrics data model and text scrape format since its 0.10.0 release. It would be nice if the Prometheus Actuator endpoint could respond with the Prometheus text format or the OpenMetrics text format based on the
Accept
header sent, using HTTP content negotiation.I made an attempt to implement this, but I couldn't figure out a way to do HTTP content negotiation and keep the current portability of the endpoint. It already is a web-only endpoint, but it works on Jersey. Switching to a
RestControllerEndpoint
, I was able to achieve the right behavior, except Jersey is not supported.A generic
ReadOperation
can specify the types it produces (so it rejects requests with unsupportedAccept
headers), but it has no access to theAccept
header to change the returned content based on it. I'm not sure what the Boot team wants to do, which is why I opted to open an issue over a pull request with the above (also, I wasn't sure of an easy way to test aRestControllerEndpoint
similar to how the currentWebEndpoint
is tested).The text was updated successfully, but these errors were encountered: