Semantic conventions for JVM metrics

Status: Mixed

This document describes semantic conventions for JVM metrics in OpenTelemetry.

JVM memory

Status: Stable

Description: Java Virtual Machine (JVM) metrics captured under the namespace jvm.memory.*

Metric: jvm.memory.used

This metric is recommended. This metric is obtained from MemoryPoolMXBean#getUsage().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.memory.usedUpDownCounterByMeasure of memory used.Stable

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.memory.pool.nameStableRecommendedstringName of the memory pool. [1]G1 Old Gen; G1 Eden space; G1 Survivor Space
jvm.memory.typeStableRecommendedstringThe type of memory.heap; non_heap (see more)

[1] jvm.memory.pool.name: Pool names are generally obtained via MemoryPoolMXBean#getName().


jvm.memory.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
heapHeap memory.Stable
non_heapNon-heap memoryStable

Metric: jvm.memory.committed

This metric is recommended. This metric is obtained from MemoryPoolMXBean#getUsage().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.memory.committedUpDownCounterByMeasure of memory committed.Stable

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.memory.pool.nameStableRecommendedstringName of the memory pool. [1]G1 Old Gen; G1 Eden space; G1 Survivor Space
jvm.memory.typeStableRecommendedstringThe type of memory.heap; non_heap (see more)

[1] jvm.memory.pool.name: Pool names are generally obtained via MemoryPoolMXBean#getName().


jvm.memory.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
heapHeap memory.Stable
non_heapNon-heap memoryStable

Metric: jvm.memory.limit

This metric is recommended. This metric is obtained from MemoryPoolMXBean#getUsage().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.memory.limitUpDownCounterByMeasure of max obtainable memory.Stable

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.memory.pool.nameStableRecommendedstringName of the memory pool. [1]G1 Old Gen; G1 Eden space; G1 Survivor Space
jvm.memory.typeStableRecommendedstringThe type of memory.heap; non_heap (see more)

[1] jvm.memory.pool.name: Pool names are generally obtained via MemoryPoolMXBean#getName().


jvm.memory.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
heapHeap memory.Stable
non_heapNon-heap memoryStable

Metric: jvm.memory.used_after_last_gc

This metric is recommended. This metric is obtained from MemoryPoolMXBean#getCollectionUsage().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.memory.used_after_last_gcUpDownCounterByMeasure of memory used, as measured after the most recent garbage collection event on this pool.Stable

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.memory.pool.nameStableRecommendedstringName of the memory pool. [1]G1 Old Gen; G1 Eden space; G1 Survivor Space
jvm.memory.typeStableRecommendedstringThe type of memory.heap; non_heap (see more)

[1] jvm.memory.pool.name: Pool names are generally obtained via MemoryPoolMXBean#getName().


jvm.memory.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
heapHeap memory.Stable
non_heapNon-heap memoryStable

JVM garbage collection

Status: Stable

Description: Java Virtual Machine (JVM) metrics captured under the namespace jvm.gc.*

Metric: jvm.gc.duration

This metric is recommended. This metric is obtained by subscribing to GarbageCollectionNotificationInfo events provided by GarbageCollectorMXBean. The duration value is obtained from GcInfo

This metric SHOULD be specified with ExplicitBucketBoundaries advisory parameter of [ 0.01, 0.1, 1, 10 ].

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.gc.durationHistogramsDuration of JVM garbage collection actions.Stable

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.gc.actionStableRecommendedstringName of the garbage collector action. [1]end of minor GC; end of major GC
jvm.gc.nameStableRecommendedstringName of the garbage collector. [2]G1 Young Generation; G1 Old Generation
jvm.gc.causeDevelopmentOpt-InstringName of the garbage collector cause. [3]System.gc(); Allocation Failure

[1] jvm.gc.action: Garbage collector action is generally obtained via GarbageCollectionNotificationInfo#getGcAction().

[2] jvm.gc.name: Garbage collector name is generally obtained via GarbageCollectionNotificationInfo#getGcName().

[3] jvm.gc.cause: Garbage collector cause is generally obtained via GarbageCollectionNotificationInfo#getGcCause().

JVM threads

Status: Stable

Description: Java Virtual Machine (JVM) metrics captured under the namespace jvm.thread.*

Metric: jvm.thread.count

This metric is recommended. This metric is obtained from a combination of

Note that this is the number of platform threads (as opposed to virtual threads).

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.thread.countUpDownCounter{thread}Number of executing platform threads.Stable

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.thread.daemonStableRecommendedbooleanWhether the thread is daemon or not.
jvm.thread.stateStableRecommendedstringState of the thread.runnable; blocked (see more)

jvm.thread.state has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
blockedA thread that is blocked waiting for a monitor lock is in this state.Stable
newA thread that has not yet started is in this state.Stable
runnableA thread executing in the Java virtual machine is in this state.Stable
terminatedA thread that has exited is in this state.Stable
timed_waitingA thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state.Stable
waitingA thread that is waiting indefinitely for another thread to perform a particular action is in this state.Stable

JVM classes

Status: Stable

Description: Java Virtual Machine (JVM) metrics captured under the namespace jvm.class.*

Metric: jvm.class.loaded

This metric is recommended. This metric is obtained from ClassLoadingMXBean#getTotalLoadedClassCount().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.class.loadedCounter{class}Number of classes loaded since JVM start.Stable

Metric: jvm.class.unloaded

This metric is recommended. This metric is obtained from ClassLoadingMXBean#getUnloadedClassCount().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.class.unloadedCounter{class}Number of classes unloaded since JVM start.Stable

Metric: jvm.class.count

This metric is recommended. This metric is obtained from ClassLoadingMXBean#getLoadedClassCount().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.class.countUpDownCounter{class}Number of classes currently loaded.Stable

JVM CPU

Status: Stable

Description: Java Virtual Machine (JVM) metrics captured under the namespace jvm.cpu.*

Metric: jvm.cpu.time

This metric is recommended.

This metric is obtained from com.sun.management.OperatingSystemMXBean#getProcessCpuTime() on HotSpot and com.ibm.lang.management.OperatingSystemMXBean#getProcessCpuTime() on OpenJ9.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.cpu.timeCountersCPU time used by the process as reported by the JVM.Stable

Metric: jvm.cpu.count

This metric is recommended. This metric is obtained from Runtime#availableProcessors(). Note that this is always an integer value (i.e. fractional or millicores are not represented).

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.cpu.countUpDownCounter{cpu}Number of processors available to the Java virtual machine.Stable

Metric: jvm.cpu.recent_utilization

This metric is recommended. This metric is obtained from com.sun.management.OperatingSystemMXBean#getProcessCpuLoad() on HotSpot and com.ibm.lang.management.OperatingSystemMXBean#getProcessCpuLoad() on OpenJ9. Note that the JVM does not provide a definition of what “recent” means.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.cpu.recent_utilizationGauge1Recent CPU utilization for the process as reported by the JVM. [1]Stable

[1]: The value range is [0.0,1.0]. This utilization is not defined as being for the specific interval since last measurement (unlike system.cpu.utilization). Reference.

Development

Status: Development

Description: In-development Java Virtual Machine (JVM) metrics captured under jvm.

JVM executors

Status: Development

Description: JVM metrics describing individual executors under the jvm.executor.* namespace.

Instrumentations SHOULD emit each metric only when the executor implementation exposes the corresponding value, and SHOULD NOT emit an estimated or substituted value in its place.

Metric: jvm.executor.thread.count

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.executor.thread.countUpDownCounter{thread}The number of executor threads that are currently in the state described by the jvm.executor.thread.state attribute.Development

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.executor.nameDevelopmentRequiredstringName of the executor. [1]pool-1-thread-*; ForkJoinPool.commonPool-worker-*; orders-vt-*
jvm.executor.thread.stateDevelopmentRequiredstringState of an executor thread.active; idle (see more)
jvm.executor.typeDevelopmentRequiredstringThe fully qualified class name of the executor implementation.java.util.concurrent.ThreadPoolExecutor; java.util.concurrent.ForkJoinPool
jvm.executor.owner.nameDevelopmentRecommendedstringName of the logical component that owns the executor. [2]tomcat; jetty; netty

[1] jvm.executor.name: The executor name SHOULD be low-cardinality. If jvm.executor.owner.name is present, the combination of jvm.executor.owner.name and jvm.executor.name SHOULD be unique within the instrumented application; otherwise, jvm.executor.name SHOULD be unique when an executor-specific name is available. If the executor implementation does not provide an explicit name, instrumentation SHOULD derive a name from available implementation-specific metadata, such as a normalized worker thread name. If no executor-specific name or metadata is available, instrumentation MAY use unknown. The unknown value does not identify an executor, and metrics from multiple executors using this value MAY be aggregated. Users requiring per-executor metric series SHOULD configure a distinct name through the executor’s ThreadFactory. Instrumentations SHOULD document how the name is derived and how users can configure it. Once metric series registration for an executor has started, jvm.executor.name and jvm.executor.owner.name MUST remain stable for the lifetime of that registration. Instrumentations SHOULD determine these attributes before the first worker is registered. Instrumentations MUST NOT re-register cumulative metrics under a new attribute set or replay prior cumulative values under new attributes.

[2] jvm.executor.owner.name: The executor owner name SHOULD be a low-cardinality identifier for the component that creates and configures the executor. It is neither the executor implementation type nor an OpenTelemetry instrumentation scope.


jvm.executor.thread.state has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
activeThe thread is currently executing a task.Development
idleThe thread currently exists but is not executing a task.Development

Metric: jvm.executor.thread.core

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.executor.thread.coreUpDownCounter{thread}The number of core threads configured for the executor.Development

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.executor.nameDevelopmentRequiredstringName of the executor. [1]pool-1-thread-*; ForkJoinPool.commonPool-worker-*; orders-vt-*
jvm.executor.typeDevelopmentRequiredstringThe fully qualified class name of the executor implementation.java.util.concurrent.ThreadPoolExecutor; java.util.concurrent.ForkJoinPool
jvm.executor.owner.nameDevelopmentRecommendedstringName of the logical component that owns the executor. [2]tomcat; jetty; netty

[1] jvm.executor.name: The executor name SHOULD be low-cardinality. If jvm.executor.owner.name is present, the combination of jvm.executor.owner.name and jvm.executor.name SHOULD be unique within the instrumented application; otherwise, jvm.executor.name SHOULD be unique when an executor-specific name is available. If the executor implementation does not provide an explicit name, instrumentation SHOULD derive a name from available implementation-specific metadata, such as a normalized worker thread name. If no executor-specific name or metadata is available, instrumentation MAY use unknown. The unknown value does not identify an executor, and metrics from multiple executors using this value MAY be aggregated. Users requiring per-executor metric series SHOULD configure a distinct name through the executor’s ThreadFactory. Instrumentations SHOULD document how the name is derived and how users can configure it. Once metric series registration for an executor has started, jvm.executor.name and jvm.executor.owner.name MUST remain stable for the lifetime of that registration. Instrumentations SHOULD determine these attributes before the first worker is registered. Instrumentations MUST NOT re-register cumulative metrics under a new attribute set or replay prior cumulative values under new attributes.

[2] jvm.executor.owner.name: The executor owner name SHOULD be a low-cardinality identifier for the component that creates and configures the executor. It is neither the executor implementation type nor an OpenTelemetry instrumentation scope.

Metric: jvm.executor.thread.limit

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.executor.thread.limitUpDownCounter{thread}The maximum number of threads allowed for the executor. [1]Development

[1]: Instrumentations SHOULD emit this metric only when the maximum thread count is finite and represents a meaningful operational limit. This metric SHOULD NOT be emitted for unbounded or effectively unbounded executors. For example, an executor with a maximum thread count of Integer.MAX_VALUE is effectively unbounded.

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.executor.nameDevelopmentRequiredstringName of the executor. [1]pool-1-thread-*; ForkJoinPool.commonPool-worker-*; orders-vt-*
jvm.executor.typeDevelopmentRequiredstringThe fully qualified class name of the executor implementation.java.util.concurrent.ThreadPoolExecutor; java.util.concurrent.ForkJoinPool
jvm.executor.owner.nameDevelopmentRecommendedstringName of the logical component that owns the executor. [2]tomcat; jetty; netty

[1] jvm.executor.name: The executor name SHOULD be low-cardinality. If jvm.executor.owner.name is present, the combination of jvm.executor.owner.name and jvm.executor.name SHOULD be unique within the instrumented application; otherwise, jvm.executor.name SHOULD be unique when an executor-specific name is available. If the executor implementation does not provide an explicit name, instrumentation SHOULD derive a name from available implementation-specific metadata, such as a normalized worker thread name. If no executor-specific name or metadata is available, instrumentation MAY use unknown. The unknown value does not identify an executor, and metrics from multiple executors using this value MAY be aggregated. Users requiring per-executor metric series SHOULD configure a distinct name through the executor’s ThreadFactory. Instrumentations SHOULD document how the name is derived and how users can configure it. Once metric series registration for an executor has started, jvm.executor.name and jvm.executor.owner.name MUST remain stable for the lifetime of that registration. Instrumentations SHOULD determine these attributes before the first worker is registered. Instrumentations MUST NOT re-register cumulative metrics under a new attribute set or replay prior cumulative values under new attributes.

[2] jvm.executor.owner.name: The executor owner name SHOULD be a low-cardinality identifier for the component that creates and configures the executor. It is neither the executor implementation type nor an OpenTelemetry instrumentation scope.

Metric: jvm.executor.queue.size

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.executor.queue.sizeUpDownCounter{task}The number of tasks currently queued for execution.Development

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.executor.nameDevelopmentRequiredstringName of the executor. [1]pool-1-thread-*; ForkJoinPool.commonPool-worker-*; orders-vt-*
jvm.executor.typeDevelopmentRequiredstringThe fully qualified class name of the executor implementation.java.util.concurrent.ThreadPoolExecutor; java.util.concurrent.ForkJoinPool
jvm.executor.owner.nameDevelopmentRecommendedstringName of the logical component that owns the executor. [2]tomcat; jetty; netty

[1] jvm.executor.name: The executor name SHOULD be low-cardinality. If jvm.executor.owner.name is present, the combination of jvm.executor.owner.name and jvm.executor.name SHOULD be unique within the instrumented application; otherwise, jvm.executor.name SHOULD be unique when an executor-specific name is available. If the executor implementation does not provide an explicit name, instrumentation SHOULD derive a name from available implementation-specific metadata, such as a normalized worker thread name. If no executor-specific name or metadata is available, instrumentation MAY use unknown. The unknown value does not identify an executor, and metrics from multiple executors using this value MAY be aggregated. Users requiring per-executor metric series SHOULD configure a distinct name through the executor’s ThreadFactory. Instrumentations SHOULD document how the name is derived and how users can configure it. Once metric series registration for an executor has started, jvm.executor.name and jvm.executor.owner.name MUST remain stable for the lifetime of that registration. Instrumentations SHOULD determine these attributes before the first worker is registered. Instrumentations MUST NOT re-register cumulative metrics under a new attribute set or replay prior cumulative values under new attributes.

[2] jvm.executor.owner.name: The executor owner name SHOULD be a low-cardinality identifier for the component that creates and configures the executor. It is neither the executor implementation type nor an OpenTelemetry instrumentation scope.

Metric: jvm.executor.queue.capacity

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.executor.queue.capacityUpDownCounter{task}The maximum number of tasks the executor queue can hold. [1]Development

[1]: Instrumentations SHOULD emit this metric only when the queue has a finite capacity that represents a meaningful operational limit. This metric SHOULD NOT be emitted for unbounded or effectively unbounded queues.

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.executor.nameDevelopmentRequiredstringName of the executor. [1]pool-1-thread-*; ForkJoinPool.commonPool-worker-*; orders-vt-*
jvm.executor.typeDevelopmentRequiredstringThe fully qualified class name of the executor implementation.java.util.concurrent.ThreadPoolExecutor; java.util.concurrent.ForkJoinPool
jvm.executor.owner.nameDevelopmentRecommendedstringName of the logical component that owns the executor. [2]tomcat; jetty; netty

[1] jvm.executor.name: The executor name SHOULD be low-cardinality. If jvm.executor.owner.name is present, the combination of jvm.executor.owner.name and jvm.executor.name SHOULD be unique within the instrumented application; otherwise, jvm.executor.name SHOULD be unique when an executor-specific name is available. If the executor implementation does not provide an explicit name, instrumentation SHOULD derive a name from available implementation-specific metadata, such as a normalized worker thread name. If no executor-specific name or metadata is available, instrumentation MAY use unknown. The unknown value does not identify an executor, and metrics from multiple executors using this value MAY be aggregated. Users requiring per-executor metric series SHOULD configure a distinct name through the executor’s ThreadFactory. Instrumentations SHOULD document how the name is derived and how users can configure it. Once metric series registration for an executor has started, jvm.executor.name and jvm.executor.owner.name MUST remain stable for the lifetime of that registration. Instrumentations SHOULD determine these attributes before the first worker is registered. Instrumentations MUST NOT re-register cumulative metrics under a new attribute set or replay prior cumulative values under new attributes.

[2] jvm.executor.owner.name: The executor owner name SHOULD be a low-cardinality identifier for the component that creates and configures the executor. It is neither the executor implementation type nor an OpenTelemetry instrumentation scope.

Metric: jvm.executor.task.completed

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.executor.task.completedCounter{task}The number of tasks completed by the executor. [1]Development

[1]: A task SHOULD be counted as completed when the executor has finished processing it, regardless of whether it returns normally, terminates with an exception, or is canceled. Cancellation during processing does not complete the task until processing ends. A task that never begins processing on the executor SHOULD NOT be counted. A task initially rejected but subsequently resubmitted to and processed by the executor SHOULD be counted when processing ends.

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.executor.nameDevelopmentRequiredstringName of the executor. [1]pool-1-thread-*; ForkJoinPool.commonPool-worker-*; orders-vt-*
jvm.executor.typeDevelopmentRequiredstringThe fully qualified class name of the executor implementation.java.util.concurrent.ThreadPoolExecutor; java.util.concurrent.ForkJoinPool
jvm.executor.owner.nameDevelopmentRecommendedstringName of the logical component that owns the executor. [2]tomcat; jetty; netty

[1] jvm.executor.name: The executor name SHOULD be low-cardinality. If jvm.executor.owner.name is present, the combination of jvm.executor.owner.name and jvm.executor.name SHOULD be unique within the instrumented application; otherwise, jvm.executor.name SHOULD be unique when an executor-specific name is available. If the executor implementation does not provide an explicit name, instrumentation SHOULD derive a name from available implementation-specific metadata, such as a normalized worker thread name. If no executor-specific name or metadata is available, instrumentation MAY use unknown. The unknown value does not identify an executor, and metrics from multiple executors using this value MAY be aggregated. Users requiring per-executor metric series SHOULD configure a distinct name through the executor’s ThreadFactory. Instrumentations SHOULD document how the name is derived and how users can configure it. Once metric series registration for an executor has started, jvm.executor.name and jvm.executor.owner.name MUST remain stable for the lifetime of that registration. Instrumentations SHOULD determine these attributes before the first worker is registered. Instrumentations MUST NOT re-register cumulative metrics under a new attribute set or replay prior cumulative values under new attributes.

[2] jvm.executor.owner.name: The executor owner name SHOULD be a low-cardinality identifier for the component that creates and configures the executor. It is neither the executor implementation type nor an OpenTelemetry instrumentation scope.

Metric: jvm.executor.task.rejected

This metric is recommended.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.executor.task.rejectedCounter{task}The number of task submissions rejected by the executor. [1]Development

[1]: A task submission SHOULD be counted as rejected when the executor invokes its rejection handler, regardless of whether the handler subsequently executes the task in the caller (for example, CallerRunsPolicy) or discards or replaces a queued task (for example, DiscardOldestPolicy). This metric counts rejected submissions, not tasks ultimately discarded from the queue.

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.executor.nameDevelopmentRequiredstringName of the executor. [1]pool-1-thread-*; ForkJoinPool.commonPool-worker-*; orders-vt-*
jvm.executor.typeDevelopmentRequiredstringThe fully qualified class name of the executor implementation.java.util.concurrent.ThreadPoolExecutor; java.util.concurrent.ForkJoinPool
jvm.executor.owner.nameDevelopmentRecommendedstringName of the logical component that owns the executor. [2]tomcat; jetty; netty

[1] jvm.executor.name: The executor name SHOULD be low-cardinality. If jvm.executor.owner.name is present, the combination of jvm.executor.owner.name and jvm.executor.name SHOULD be unique within the instrumented application; otherwise, jvm.executor.name SHOULD be unique when an executor-specific name is available. If the executor implementation does not provide an explicit name, instrumentation SHOULD derive a name from available implementation-specific metadata, such as a normalized worker thread name. If no executor-specific name or metadata is available, instrumentation MAY use unknown. The unknown value does not identify an executor, and metrics from multiple executors using this value MAY be aggregated. Users requiring per-executor metric series SHOULD configure a distinct name through the executor’s ThreadFactory. Instrumentations SHOULD document how the name is derived and how users can configure it. Once metric series registration for an executor has started, jvm.executor.name and jvm.executor.owner.name MUST remain stable for the lifetime of that registration. Instrumentations SHOULD determine these attributes before the first worker is registered. Instrumentations MUST NOT re-register cumulative metrics under a new attribute set or replay prior cumulative values under new attributes.

[2] jvm.executor.owner.name: The executor owner name SHOULD be a low-cardinality identifier for the component that creates and configures the executor. It is neither the executor implementation type nor an OpenTelemetry instrumentation scope.

Metric: jvm.memory.init

This metric is recommended. This metric is obtained from MemoryPoolMXBean#getUsage().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.memory.initUpDownCounterByMeasure of initial memory requested.Development

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.memory.pool.nameStableRecommendedstringName of the memory pool. [1]G1 Old Gen; G1 Eden space; G1 Survivor Space
jvm.memory.typeStableRecommendedstringThe type of memory.heap; non_heap (see more)

[1] jvm.memory.pool.name: Pool names are generally obtained via MemoryPoolMXBean#getName().


jvm.memory.type has the following list of well-known values. If one of them applies, then the respective value MUST be used; otherwise, a custom value MAY be used.

ValueDescriptionStability
heapHeap memory.Stable
non_heapNon-heap memoryStable

Metric: jvm.system.cpu.utilization

This metric is Opt-In. This metric is obtained from com.sun.management.OperatingSystemMXBean#getSystemCpuLoad() on Java version 8..13, com.sun.management.OperatingSystemMXBean#getCpuLoad() on Java version 14+, and com.ibm.lang.management.OperatingSystemMXBean#getSystemCpuLoad() on OpenJ9.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.system.cpu.utilizationGauge1Recent CPU utilization for the whole system as reported by the JVM. [1]Development

[1]: The value range is [0.0,1.0]. This utilization is not defined as being for the specific interval since last measurement (unlike system.cpu.utilization). Reference.

Metric: jvm.system.cpu.load_1m

This metric is Opt-In. This metric is obtained from OperatingSystemMXBean#getSystemLoadAverage().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.system.cpu.load_1mGauge{run_queue_item}Average CPU load of the whole system for the last minute as reported by the JVM. [1]Development

[1]: The value range is [0,n], where n is the number of CPU cores - or a negative number if the value is not available. This utilization is not defined as being for the specific interval since last measurement (unlike system.cpu.utilization). Reference.

Metric: jvm.buffer.memory.used

This metric is recommended. This metric is obtained from BufferPoolMXBean#getMemoryUsed().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.buffer.memory.usedUpDownCounterByMeasure of memory used by buffers.Development

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.buffer.pool.nameDevelopmentRecommendedstringName of the buffer pool. [1]mapped; direct

[1] jvm.buffer.pool.name: Pool names are generally obtained via BufferPoolMXBean#getName().

Metric: jvm.buffer.memory.limit

This metric is recommended. This metric is obtained from BufferPoolMXBean#getTotalCapacity().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.buffer.memory.limitUpDownCounterByMeasure of total memory capacity of buffers.Development

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.buffer.pool.nameDevelopmentRecommendedstringName of the buffer pool. [1]mapped; direct

[1] jvm.buffer.pool.name: Pool names are generally obtained via BufferPoolMXBean#getName().

Metric: jvm.buffer.count

This metric is recommended. This metric is obtained from BufferPoolMXBean#getCount().

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.buffer.countUpDownCounter{buffer}Number of buffers in the pool.Development

Attributes:

KeyStabilityRequirement LevelValue TypeDescriptionExample Values
jvm.buffer.pool.nameDevelopmentRecommendedstringName of the buffer pool. [1]mapped; direct

[1] jvm.buffer.pool.name: Pool names are generally obtained via BufferPoolMXBean#getName().

Release Candidate

Status: Release Candidate

Description: Release-candidate Java Virtual Machine (JVM) metrics captured under jvm.

Metric: jvm.file_descriptor.count

This metric is Opt-In. This metric is obtained from UnixOperatingSystemMXBean#getOpenFileDescriptorCount().

Instrumentations SHOULD emit this metric only when the value is finite and represents a meaningful operational limit. This metric SHOULD NOT be emitted for non-meaningful values. For example, a negative value or equal to Long.MAX_VALUE (2^63-1) SHOULD NOT be emitted.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.file_descriptor.countUpDownCounter{file_descriptor}Number of open file descriptors as reported by the JVM.Release Candidate

Metric: jvm.file_descriptor.limit

This metric is Opt-In. This metric is obtained from UnixOperatingSystemMXBean#getMaxFileDescriptorCount().

Instrumentations SHOULD emit this metric only when the value is finite and represents a meaningful operational limit. This metric SHOULD NOT be emitted for non-meaningful values. For example, a negative value or equal to Long.MAX_VALUE (2^63-1) SHOULD NOT be emitted.

NameInstrument TypeUnit (UCUM)DescriptionStabilityEntity Associations
jvm.file_descriptor.limitUpDownCounter{file_descriptor}Measure of max open file descriptors as reported by the JVM.Release Candidate