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

Track JVM gc time #2902

Closed
jack-berg opened this issue Oct 24, 2022 · 2 comments · Fixed by #2903
Closed

Track JVM gc time #2902

jack-berg opened this issue Oct 24, 2022 · 2 comments · Fixed by #2903
Assignees
Labels
[label deprecated] triaged-accepted [label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PR spec:metrics Related to the specification/metrics directory

Comments

@jack-berg
Copy link
Member

jack-berg commented Oct 24, 2022

Related to #2900.

Its valuable to track the time spent in garbage collection, how many garbage collection events took place, and the type of garbage collection events that took place (different garbage collector implementations have various phases which happen concurrently or in parallel).

I proposed here that we use a histogram to collect this data:

Name Description Unit Unit UCUM Instrument Type Value Type Attribute Key Attribute Values
process.runtime.jvm.gc.time Time spent performing JVM garbage collection actions Milliseconds ms Histogram Int64 gc Name of garbage collector
action The collection action performed

Recording gc event times as a histogram would enable the following analysis:

  • Total time spent on garbage collection.
  • Count of garbage collection events.
  • Min, max, average, percentiles of garbage collection time events.
  • The attributes allow you to characterize gc time by the types of events. With a little prior knowledge you can analyze all gc spent concurrently vs stop the world.
@jack-berg jack-berg added the spec:metrics Related to the specification/metrics directory label Oct 24, 2022
@carlosalberto
Copy link
Contributor

Similarly to #2900, it makes sense given the existing Java GC metrics - I'm mostly curious about the "action" attribute as it's not well explained in the Java docs themselves, so your examples help (and even more examples would be appreciated).

@carlosalberto carlosalberto added the [label deprecated] triaged-accepted [label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PR label Oct 31, 2022
@carlosalberto
Copy link
Contributor

cc @jsuereth @jmacd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[label deprecated] triaged-accepted [label deprecated] Issue triaged and accepted by OTel community, can proceed with creating a PR spec:metrics Related to the specification/metrics directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants