Skip to content

Conversation

@dsmeytis
Copy link

Hello,
Monitoring service (i.e. DataDog) gives an error in attempt to gather metrics exposed by promhttp because it doesn't put any Content-Type header into HTTP response. This small change includes Content-Type text/plain to the responses in order to fix this problem.
Thanks for your attention.

@dsmeytis dsmeytis requested a review from a team as a code owner April 23, 2021 09:00
@xmcqueen
Copy link

xmcqueen commented May 6, 2021

Looks good to me.

#include "microhttpd.h"
#include "prom.h"

#define MIMETYPE_TEXT_PLAIN "text/plain"

Choose a reason for hiding this comment

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

text/plain; version=0.0.4; charset=utf-8 is the correct value for this.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, fixed.

@wangzw
Copy link

wangzw commented Sep 15, 2025

Is there any reason not merging this? Got the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants