From c76f9ddb7c259ddbc3ca00d0760bc2be23aece5f Mon Sep 17 00:00:00 2001 From: jack-berg <34418638+jack-berg@users.noreply.github.com> Date: Wed, 26 Jan 2022 11:55:47 -0600 Subject: [PATCH] Add jvm memory runtime metrics (#2272) Co-authored-by: Trask Stalnaker Co-authored-by: Armin Ruech --- .../runtime-environment-metrics.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/specification/metrics/semantic_conventions/runtime-environment-metrics.md b/specification/metrics/semantic_conventions/runtime-environment-metrics.md index 855327e5a..bd07f0b16 100644 --- a/specification/metrics/semantic_conventions/runtime-environment-metrics.md +++ b/specification/metrics/semantic_conventions/runtime-environment-metrics.md @@ -55,5 +55,20 @@ consider, for example pthreads vs green thread implementations. **Description:** Java Virtual Machine (JVM) metrics captured under `process.runtime.jvm.` -| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | -|------|-------------|-------|-----------------|------------|---------------|------------------| +All JVM metric attributes are required unless otherwise indicated. + +| Name | Description | Unit | Unit ([UCUM](README.md#instrument-units)) | Instrument Type | Value Type | Attribute Key | Attribute Values | +|--------------------------------------|-------------------------------------|-------|-------------------------------------------|----------------------------|------------|---------------|-----------------------| +| process.runtime.jvm.memory.usage | Measure of memory used | Bytes | `By` | Asynchronous UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` | +| | | | | | | pool | Name of pool [1] | +| process.runtime.jvm.memory.init | Measure of initial memory requested | Bytes | `By` | Asynchronous UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` | +| | | | | | | pool | Name of pool [1] | +| process.runtime.jvm.memory.committed | Measure of memory committed | Bytes | `By` | Asynchronous UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` | +| | | | | | | pool | Name of pool [1] | +| process.runtime.jvm.memory.max | Measure of max obtainable memory | Bytes | `By` | Asynchronous UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` | +| | | | | | | pool | Name of pool [1] | + +**[1]**: Pool names are generally obtained +via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()) +. Examples include `G1 Old Gen`, `G1 Eden space`, `G1 Survivor Space` +, `Metaspace`, etc.