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 GC metrics to prometheus endpoints #954

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

Add GC metrics to prometheus endpoints #954

wants to merge 2 commits into from

Conversation

spuun
Copy link
Member

@spuun spuun commented Feb 14, 2025

WHAT is this pull request doing?

This will make stats loop save GC.prof_stats which is then added to prometheus metrics

Metrics exported is what's in https://github.com/ivmai/bdwgc/blob/47e0ef445d1aa48b8c48ef166b117386e4e0100c/include/gc/gc.h#L795

Fixes #936

HOW can this pull request be tested?

Spin up lavinmq, then curl -u guest:guest http://localhost:15672/metrics | grep gc_

@spuun spuun requested a review from a team as a code owner February 14, 2025 15:41
@spuun
Copy link
Member Author

spuun commented Feb 15, 2025

TODO: fix naming according to https://prometheus.io/docs/practices/naming/

@jage
Copy link
Member

jage commented Feb 17, 2025

Took it for a spin in Prometheus + Grafana via Snowstorm, a few 0 values but maybe expected.

Screenshot 2025-02-17 at 11 46 33 Screenshot 2025-02-17 at 11 49 58

I guess there's no timings for how long it spends in GC, e.g. mark, sweep?

@spuun
Copy link
Member Author

spuun commented Feb 18, 2025

Took it for a spin in Prometheus + Grafana via Snowstorm, a few 0 values but maybe expected.

Yeah. Probably. It may depend on the gc lib version.

I guess there's no timings for how long it spends in GC, e.g. mark, sweep?

Probably not. This is what I've found.

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.

Add GC stats to prometheus metrics
2 participants