-
Notifications
You must be signed in to change notification settings - Fork 827
Add GC duration histogram #1738
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
base: main
Are you sure you want to change the base?
Conversation
0dabc29 to
208482b
Compare
|
would it make sense to implement exactly like otel sem conv? |
|
hi, to be honest I used the sem conv just for a reference - I wasn't sure what buckets to set so the Histogram is useful for all of the library's users, and it turns out that there was already an exact same discussion in otel community :) This PR is motivated by a real need to alert in case long GC cycle happenes and to improve the visibility of the STW pause durations. I was considering simply implementing this metric on my site, but I thought it might be worth to suggest it as a change to the library, so that others could benefit too :D |
I think it's a great addition to this library! I know that OTel spend a lot of time figuring out the how to name metrics and labels - so if at all possible, I'd like to do it the same way, so that users can reuse queries and dashboards. You can try to point your favorite AI tool to the semantic conventions to get you most of the work done. |
|
i'm happy you also see value in this :) i refactored the metric so it aligns with otel conventions - i changed the name to |
Signed-off-by: gniadeck <77535280+gniadeck@users.noreply.github.com>
Signed-off-by: gniadeck <77535280+gniadeck@users.noreply.github.com>
Signed-off-by: gniadeck <77535280+gniadeck@users.noreply.github.com>
Signed-off-by: gniadeck <77535280+gniadeck@users.noreply.github.com>
ffd3ad4 to
042e03c
Compare
introduces a Prometheus histogram metric
jvm_gc_duration_secondsto record JVM garbage collection pause durations. existing metrics provide limited visibility into long GC pauses, making it difficult to detect latency spikes. this change leverages the already registered GC notifications (as used inJvmMemoryPoolAllocationMetrics) to capture pause durations without additional instrumentation.the histogram uses
0.01, 0.1, 1, 10buckets and includes labels forgc name,action, andcause, enabling detailed monitoring of both short and long GC pauses. this addresses the lack of visibility highlighted in community discussions such as this one. buckets are also defined according to the opentelemetry semantic conventions specExample result: