Skip to content

Commit

Permalink
Merge pull request #30959 from geoand/micrometer-metrics-html
Browse files Browse the repository at this point in the history
Return text from /q/metrics when the Accept header contains html
  • Loading branch information
geoand authored Feb 8, 2023
2 parents f39380f + dbd44bb commit c44d6f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private String chooseContentType(String acceptHeader) {
if (acceptHeader == null) {
return TextFormat.CONTENT_TYPE_OPENMETRICS_100;
}
if (acceptHeader.startsWith("text/plain")) {
if (acceptHeader.contains("text/plain") || acceptHeader.contains("text/html")) {
return TextFormat.CONTENT_TYPE_004;
}
return TextFormat.CONTENT_TYPE_OPENMETRICS_100;
Expand Down

0 comments on commit c44d6f4

Please sign in to comment.