Skip to content

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.

2 participants