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 simple metrics endpoint for rageshake. #82

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

michaelkaye
Copy link
Contributor

Import prometheus metrics library and expose default metrics on alternate port (if configured).

If no special configuration is made then no change should be visible.

Example startups:

^Cmichaelk@michaelk-XPS-13-9370:~/work/rageshake$ docker run -v /home/michaelk/work/rageshake/rageshake.yaml:/rageshake.yaml rageshake
No github_token configured. Reporting bugs to github is disabled.
No gitlab_token configured. Reporting bugs to gitlab is disaled.
No slack_webhook_url configured. Reporting bugs to slack is disabled.
No generic_webhook_urls configured.
2023/11/08 10:38:03 Using http://localhost:9110/api/listing as public URI
2023/11/08 10:38:03 Listening on :9110
^C
michaelk@michaelk-XPS-13-9370:~/work/rageshake$ docker run -p 9112 -v /home/michaelk/work/rageshake/rageshake.yaml:/rageshake.yaml rageshake -metrics :9112
No github_token configured. Reporting bugs to github is disabled.
No gitlab_token configured. Reporting bugs to gitlab is disaled.
No slack_webhook_url configured. Reporting bugs to slack is disabled.
No generic_webhook_urls configured.
2023/11/08 10:38:31 Using http://localhost:9110/api/listing as public URI
2023/11/08 10:38:31 Listening on :9110
2023/11/08 10:38:31 Metrics Listening on :9112
^C

When metrics listening they're available like so:

michaelk@michaelk-XPS-13-9370:~$ curl http://localhost:9112/metrics
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
...

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.

1 participant