-
Notifications
You must be signed in to change notification settings - Fork 913
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
Issue 2161: set metrics endpoint content-type #4208
Conversation
bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/MetricsService.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
bookkeeper-server/src/main/java/org/apache/bookkeeper/server/http/service/MetricsService.java
Outdated
Show resolved
Hide resolved
@eolivelli Would you please review this PR again? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great
+1
* fix: set metrics endpoint content-type when bookie http server is enabled * fix: checkstyle * fix: use existing prometheus content type constant * chore: use minimal dependency / license fixes * Revert "chore: use minimal dependency / license fixes" This reverts commit 7daf8be. * Revert "fix: use existing prometheus content type constant" This reverts commit c265c49. (cherry picked from commit 382184e)
* fix: set metrics endpoint content-type when bookie http server is enabled * fix: checkstyle * fix: use existing prometheus content type constant * chore: use minimal dependency / license fixes * Revert "chore: use minimal dependency / license fixes" This reverts commit 7daf8be. * Revert "fix: use existing prometheus content type constant" This reverts commit c265c49.
* fix: set metrics endpoint content-type when bookie http server is enabled * fix: checkstyle * fix: use existing prometheus content type constant * chore: use minimal dependency / license fixes * Revert "chore: use minimal dependency / license fixes" This reverts commit 7daf8be. * Revert "fix: use existing prometheus content type constant" This reverts commit c265c49. (cherry picked from commit 382184e)
Until this change is available, it's possible to configure |
Motivation
Fixes #2161
Changes
Add contentType to HttpServiceResponse and map it in VertxAbstractHandler which allows
MetricsService (which is used instead of PrometheusServlet when bookie http server is enabled) to set the http Content-Type header to the right value which allow successful scraping of the endpoint by e.g. New Relic
Master Issue: #2161