Open
Description
How can we make our docs better?
A customer is confused about what is the definition of GC timesliced metrics such as the followings.
- 'GC/G1 Young Generation'
- 'GC/G1 Old Generation'
- 'GC/G1 Concurrent GC'
These metrics are queries by the following NRQL.
SELECT sum(newrelic.timeslice.value) FROM Metric WHERE metricTimesliceName LIKE 'GC%' AND appName = '<app-name>' FACET host, metricTimesliceName TIMESERIES
https://docs.newrelic.com/docs/apm/agents/java-agent/features/jvms-page-java-view-app-server-metrics-jmx/
says just Garbage collection: The garbage collection CPU time.
After reading the Agent code and JavaDoc, we can add the following explanation to the doc.
- GC metrics are based on the JVM MXBean metrics.
- While the JMX metrics are accumulated values, New Relic stores the values are difference between data points.
- You can query the number of collections that have occurred in specified time window with
count(newrelic.timeslice.value)
. - You can query the collection elapsed time in milliseconds in specified time window with
sum(newrelic.timeslice.value)
.