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

Add prometheus response format to endpoints #273

Merged
merged 4 commits into from
Jan 16, 2024

Conversation

n8maninger
Copy link
Member

Adds an internal Prometheus encoder for encoding responses in the Prometheus sample format.

Also adds a response path param to some endpoints to support different output formats (i.e. http://localhost:9980/api/settings?response=prometheus)

Supported formats:

  • prometheus
  • json

Supported endpoints:

  • GET /state/host
  • GET /state/consensus
  • GET /settings
  • GET /metrics
  • GET /wallet

@n8maninger
Copy link
Member Author

n8maninger commented Jan 14, 2024

@bustedware I didn't add all of the endpoints, but this is the direction we should be going wrt supporting Prometheus within hostd. If there are any changes you need to make, you can either let me know or make them yourself after this is merged.

@n8maninger n8maninger force-pushed the nate/add-prometheus-formats branch 3 times, most recently from d9adf14 to 40e2843 Compare January 15, 2024 04:57
@n8maninger n8maninger merged commit 5a024a7 into master Jan 16, 2024
6 checks passed
@n8maninger n8maninger deleted the nate/add-prometheus-formats branch January 16, 2024 18:09
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.

None yet

1 participant