This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/java-agent/instrumentation/runtime-telemetry.md.

JVM Runtime Telemetry

OpenTelemetry Java agent instrumentation

This instrumentation enables JVM runtime metrics using JMX (Java 8+) and JFR (Java 17+) to monitor classes, CPU, garbage collection, memory, and threads.

  • Name: runtime-telemetry
  • Scope: io.opentelemetry.runtime-telemetry
  • Library: https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/runtime-telemetry

Telemetry

When Java17

Metrics

MetricInstrumentTypeUnitDescription
jvm.buffer.countupdowncounterLONG_SUM{buffer}Number of buffers in the pool.
jvm.buffer.memory.limitupdowncounterLONG_SUMByMeasure of total memory capacity of buffers.
jvm.buffer.memory.usedupdowncounterLONG_SUMByMeasure of memory used by buffers.
jvm.class.countupdowncounterLONG_SUM{class}Number of classes currently loaded.
jvm.class.loadedcounterLONG_SUM{class}Number of classes loaded since JVM start.
jvm.class.unloadedcounterLONG_SUM{class}Number of classes unloaded since JVM start.
jvm.cpu.longlockhistogramHISTOGRAMsLong lock times
jvm.cpu.recent_utilizationgaugeDOUBLE_GAUGE1Recent CPU utilization for the process as reported by the JVM.
jvm.gc.durationhistogramHISTOGRAMsDuration of JVM garbage collection actions.
jvm.memory.allocationhistogramHISTOGRAMByMeasure of memory allocations.
jvm.memory.committedupdowncounterLONG_SUMByMeasure of memory committed.
jvm.memory.initupdowncounterLONG_SUMByMeasure of initial memory requested.
jvm.memory.limitupdowncounterLONG_SUMByMeasure of max obtainable memory.
jvm.memory.usedupdowncounterLONG_SUMByMeasure of memory used.
jvm.memory.used_after_last_gcupdowncounterLONG_SUMByMeasure of memory used, as measured after the most recent garbage collection event on this pool.
jvm.system.cpu.utilizationgaugeDOUBLE_GAUGE1Recent CPU utilization for the whole system as reported by the JVM.
jvm.thread.countupdowncounterLONG_SUM{thread}Number of executing platform threads.
MetricAttributes
jvm.buffer.countjvm.buffer.pool.name (STRING)
jvm.buffer.memory.limitjvm.buffer.pool.name (STRING)
jvm.buffer.memory.usedjvm.buffer.pool.name (STRING)
jvm.gc.durationjvm.gc.action (STRING), jvm.gc.name (STRING)
jvm.memory.allocationarena (STRING)
jvm.memory.committedjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.memory.initjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.memory.limitjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.memory.usedjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.memory.used_after_last_gcjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.thread.countjvm.thread.daemon (BOOLEAN)

When Java21

Metrics

MetricInstrumentTypeUnitDescription
jvm.thread.virtual.pinnedhistogramHISTOGRAMsDuration of virtual thread pinning.

When default

Metrics

MetricInstrumentTypeUnitDescription
jvm.buffer.countupdowncounterLONG_SUM{buffer}Number of buffers in the pool.
jvm.buffer.memory.limitupdowncounterLONG_SUMByMeasure of total memory capacity of buffers.
jvm.buffer.memory.usedupdowncounterLONG_SUMByMeasure of memory used by buffers.
jvm.class.countupdowncounterLONG_SUM{class}Number of classes currently loaded.
jvm.class.loadedcounterLONG_SUM{class}Number of classes loaded since JVM start.
jvm.class.unloadedcounterLONG_SUM{class}Number of classes unloaded since JVM start.
jvm.cpu.countupdowncounterLONG_SUM{cpu}Number of processors available to the Java virtual machine.
jvm.cpu.recent_utilizationgaugeDOUBLE_GAUGE1Recent CPU utilization for the process as reported by the JVM.
jvm.cpu.timecounterDOUBLE_SUMsCPU time used by the process as reported by the JVM.
jvm.file_descriptor.countupdowncounterLONG_SUM{file_descriptor}Number of open file descriptors as reported by the JVM.
jvm.file_descriptor.limitupdowncounterLONG_SUM{file_descriptor}Measure of max open file descriptors as reported by the JVM.
jvm.gc.durationhistogramHISTOGRAMsDuration of JVM garbage collection actions.
jvm.memory.committedupdowncounterLONG_SUMByMeasure of memory committed.
jvm.memory.initupdowncounterLONG_SUMByMeasure of initial memory requested.
jvm.memory.limitupdowncounterLONG_SUMByMeasure of max obtainable memory.
jvm.memory.usedupdowncounterLONG_SUMByMeasure of memory used.
jvm.memory.used_after_last_gcupdowncounterLONG_SUMByMeasure of memory used, as measured after the most recent garbage collection event on this pool.
jvm.system.cpu.load_1mgaugeDOUBLE_GAUGE{run_queue_item}Average CPU load of the whole system for the last minute as reported by the JVM.
jvm.system.cpu.utilizationgaugeDOUBLE_GAUGE1Recent CPU utilization for the whole system as reported by the JVM.
jvm.thread.countupdowncounterLONG_SUM{thread}Number of executing platform threads.
MetricAttributes
jvm.buffer.countjvm.buffer.pool.name (STRING)
jvm.buffer.memory.limitjvm.buffer.pool.name (STRING)
jvm.buffer.memory.usedjvm.buffer.pool.name (STRING)
jvm.gc.durationjvm.gc.action (STRING), jvm.gc.cause (STRING), jvm.gc.name (STRING)
jvm.memory.committedjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.memory.initjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.memory.limitjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.memory.usedjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.memory.used_after_last_gcjvm.memory.pool.name (STRING), jvm.memory.type (STRING)
jvm.thread.countjvm.thread.daemon (BOOLEAN), jvm.thread.state (STRING)

Configuration

OptionTypeDefaultDescription
otel.instrumentation.runtime-telemetry.emit-experimental-jfr-metricsbooleanfalseEnables the capture of experimental JFR-based JVM runtime metrics on Java 17+.
otel.instrumentation.runtime-telemetry.emit-experimental-metricsbooleanfalseEnables the capture of experimental JMX-based JVM runtime metrics.
otel.instrumentation.runtime-telemetry.experimental.jfr-metrics.excludedlistExcludes JVM runtime metrics from JFR on Java 17+ using exact names or glob patterns with * and ?. Excluded patterns take precedence over included patterns, including over shorthand and legacy selections. Configuring this property without included selects all metrics except those excluded.
otel.instrumentation.runtime-telemetry.experimental.jfr-metrics.includedlistSelects JVM runtime metrics to source from JFR on Java 17+. Supports exact names and glob patterns with * and ?. Configuring either JFR metric selector property activates JFR. Use * to select all metrics.
otel.instrumentation.runtime-telemetry.experimental.package-emitter.enabledbooleanfalseEnables creating events for JAR libraries used by the application.
otel.instrumentation.runtime-telemetry.experimental.package-emitter.jars-per-secondint10The number of JAR files processed per second by the package emitter.
otel.instrumentation.runtime-telemetry.experimental.prefer-jfrbooleanfalseDeprecated: use otel.instrumentation.runtime-telemetry.experimental.jfr-metrics.included instead. Prefer JFR over JMX for metrics available from both sources, on Java 17+.

Data

  • JSON (latest): /data/javaagent/instrumentations/runtime-telemetry/latest.json
  • JSON (pinned): /data/javaagent/instrumentations/runtime-telemetry/runtime-telemetry-906b92712886.json
  • Explore: /java-agent/instrumentation/runtime-telemetry