Skip to content
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

Merged
merged 6 commits into from
Mar 18, 2024

Conversation

tomjo
Copy link
Contributor

@tomjo tomjo commented Feb 9, 2024

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

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tomjo tomjo requested a review from eolivelli March 6, 2024 07:49
@hangc0276
Copy link
Contributor

@eolivelli Would you please review this PR again? Thanks.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great

+1

@eolivelli eolivelli merged commit 382184e into apache:master Mar 18, 2024
20 checks passed
nicoloboschi pushed a commit that referenced this pull request Mar 21, 2024
* 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)
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
* 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When httpServerEnabled=true, Prometheus reports doesn't set content-type
6 participants