Skip to content

feat(metrics): add Prometheus-compatible headers to metrics API #197

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pinylin
Copy link

@pinylin pinylin commented May 29, 2025

Previously the metrics endpoint not included headers compatible with Promtheus.
Now adds 'Content-Type: text/plain' and other headers needed
for Prometheus scraping while maintaining backward

refer: # protocol-headers

@levkk
Copy link
Collaborator

levkk commented May 29, 2025

Hey! Thanks for the PR and apologies for reviewing it late. Just small issue: could you return Result instead of using expect? I know the odds of this panicking are 0, but I'm just trying to make sure we don't have anything that can crash PgDog in production unexpectedly. Thanks!

One more administrative thing to discuss as well is a CLA. PgDog is an AGPL-licensed project and also a company. If you'd like to contribute, you are more than welcome to do so. If not, I completely understand!

Thanks!

@CLAassistant
Copy link

CLAassistant commented Jun 3, 2025

CLA assistant check
All committers have signed the CLA.

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.

3 participants