diff --git a/CHANGELOG.md b/CHANGELOG.md index ca6606f864..94765a2807 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,3 +66,5 @@ release. ([#3458](https://github.com/open-telemetry/opentelemetry-specification/pull/3458)) - Specify the value range for JVM CPU metrics. ([#13](https://github.com/open-telemetry/semantic-conventions/pull/13)) +- Split out sections for proposed stable JVM metrics and experimental JVM metrics. + ([#56](https://github.com/open-telemetry/semantic-conventions/pull/56)) diff --git a/semantic_conventions/metrics/process-runtime-jvm-metrics-experimental.yaml b/semantic_conventions/metrics/process-runtime-jvm-metrics-experimental.yaml new file mode 100644 index 0000000000..f8b134fba5 --- /dev/null +++ b/semantic_conventions/metrics/process-runtime-jvm-metrics-experimental.yaml @@ -0,0 +1,67 @@ +groups: + - id: metric.process.runtime.jvm.memory.init + type: metric + metric_name: process.runtime.jvm.memory.init + extends: attributes.process.runtime.jvm.memory + brief: "Measure of initial memory requested." + instrument: updowncounter + unit: "By" + + - id: metric.process.runtime.jvm.system.cpu.utilization + type: metric + metric_name: process.runtime.jvm.system.cpu.utilization + brief: "Recent CPU utilization for the whole system." + note: > + 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](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()). + instrument: gauge + unit: "1" + + - id: metric.process.runtime.jvm.system.cpu.load_1m + type: metric + metric_name: process.runtime.jvm.system.cpu.load_1m + brief: "Average CPU load of the whole system for the last minute." + note: > + The value range is [0,n], where n is the number of CPU cores - or a negative number of the value is not available. + This utilization is not defined as being for the specific interval since last measurement + (unlike `system.cpu.utilization`). + [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()). + instrument: gauge + unit: "1" + + - id: attributes.process.runtime.jvm.buffer + type: attribute_group + brief: "Describes JVM buffer metric attributes." + attributes: + - ref: pool + brief: Name of the buffer pool. + examples: [ "mapped", "direct" ] + note: > + Pool names are generally obtained via + [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). + + - id: metric.process.runtime.jvm.buffer.usage + type: metric + metric_name: process.runtime.jvm.buffer.usage + extends: attributes.process.runtime.jvm.buffer + brief: "Measure of memory used by buffers." + instrument: updowncounter + unit: "By" + + - id: metric.process.runtime.jvm.buffer.limit + type: metric + metric_name: process.runtime.jvm.buffer.limit + extends: attributes.process.runtime.jvm.buffer + brief: "Measure of total memory capacity of buffers." + instrument: updowncounter + unit: "By" + + - id: metric.process.runtime.jvm.buffer.count + type: metric + metric_name: process.runtime.jvm.buffer.count + extends: attributes.process.runtime.jvm.buffer + brief: "Number of buffers in the pool." + instrument: updowncounter + unit: "{buffer}" diff --git a/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml b/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml index fd2aa5d353..36fb28a63c 100644 --- a/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml +++ b/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml @@ -33,14 +33,6 @@ groups: instrument: updowncounter unit: "By" - - id: metric.process.runtime.jvm.memory.init - type: metric - metric_name: process.runtime.jvm.memory.init - extends: attributes.process.runtime.jvm.memory - brief: "Measure of initial memory requested." - instrument: updowncounter - unit: "By" - - id: metric.process.runtime.jvm.memory.committed type: metric metric_name: process.runtime.jvm.memory.committed @@ -133,62 +125,3 @@ groups: [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getProcessCpuLoad()). instrument: gauge unit: "1" - - - id: metric.process.runtime.jvm.system.cpu.utilization - type: metric - metric_name: process.runtime.jvm.system.cpu.utilization - brief: "Recent CPU utilization for the whole system." - note: > - 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](https://docs.oracle.com/en/java/javase/17/docs/api/jdk.management/com/sun/management/OperatingSystemMXBean.html#getCpuLoad()). - instrument: gauge - unit: "1" - - - id: metric.process.runtime.jvm.system.cpu.load_1m - type: metric - metric_name: process.runtime.jvm.system.cpu.load_1m - brief: "Average CPU load of the whole system for the last minute." - note: > - The value range is [0,n], where n is the number of CPU cores - or a negative number of the value is not available. - This utilization is not defined as being for the specific interval since last measurement - (unlike `system.cpu.utilization`). - [Reference](https://docs.oracle.com/en/java/javase/17/docs/api/java.management/java/lang/management/OperatingSystemMXBean.html#getSystemLoadAverage()). - instrument: gauge - unit: "1" - - - id: attributes.process.runtime.jvm.buffer - type: attribute_group - brief: "Describes JVM buffer metric attributes." - attributes: - - ref: pool - brief: Name of the buffer pool. - examples: [ "mapped", "direct" ] - note: > - Pool names are generally obtained via - [BufferPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/BufferPoolMXBean.html#getName()). - - - id: metric.process.runtime.jvm.buffer.usage - type: metric - metric_name: process.runtime.jvm.buffer.usage - extends: attributes.process.runtime.jvm.buffer - brief: "Measure of memory used by buffers." - instrument: updowncounter - unit: "By" - - - id: metric.process.runtime.jvm.buffer.limit - type: metric - metric_name: process.runtime.jvm.buffer.limit - extends: attributes.process.runtime.jvm.buffer - brief: "Measure of total memory capacity of buffers." - instrument: updowncounter - unit: "By" - - - id: metric.process.runtime.jvm.buffer.count - type: metric - metric_name: process.runtime.jvm.buffer.count - extends: attributes.process.runtime.jvm.buffer - brief: "Number of buffers in the pool." - instrument: updowncounter - unit: "{buffer}" diff --git a/specification/metrics/semantic_conventions/runtime-environment-metrics.md b/specification/metrics/semantic_conventions/runtime-environment-metrics.md index bd5e2dc970..788ed0c71a 100644 --- a/specification/metrics/semantic_conventions/runtime-environment-metrics.md +++ b/specification/metrics/semantic_conventions/runtime-environment-metrics.md @@ -21,7 +21,6 @@ semantic conventions when instrumenting runtime environments. - [Attributes](#attributes) - [JVM Metrics](#jvm-metrics) * [Metric: `process.runtime.jvm.memory.usage`](#metric-processruntimejvmmemoryusage) - * [Metric: `process.runtime.jvm.memory.init`](#metric-processruntimejvmmemoryinit) * [Metric: `process.runtime.jvm.memory.committed`](#metric-processruntimejvmmemorycommitted) * [Metric: `process.runtime.jvm.memory.limit`](#metric-processruntimejvmmemorylimit) * [Metric: `process.runtime.jvm.memory.usage_after_last_gc`](#metric-processruntimejvmmemoryusage_after_last_gc) @@ -31,6 +30,8 @@ semantic conventions when instrumenting runtime environments. * [Metric: `process.runtime.jvm.classes.unloaded`](#metric-processruntimejvmclassesunloaded) * [Metric: `process.runtime.jvm.classes.current_loaded`](#metric-processruntimejvmclassescurrent_loaded) * [Metric: `process.runtime.jvm.cpu.utilization`](#metric-processruntimejvmcpuutilization) +- [JVM Metrics (Experimental)](#jvm-metrics-experimental) + * [Metric: `process.runtime.jvm.memory.init`](#metric-processruntimejvmmemoryinit) * [Metric: `process.runtime.jvm.system.cpu.utilization`](#metric-processruntimejvmsystemcpuutilization) * [Metric: `process.runtime.jvm.system.cpu.load_1m`](#metric-processruntimejvmsystemcpuload_1m) * [Metric: `process.runtime.jvm.buffer.usage`](#metric-processruntimejvmbufferusage) @@ -102,33 +103,6 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle | `non_heap` | Non-heap memory | -### Metric: `process.runtime.jvm.memory.init` - -This metric is [recommended][MetricRecommended]. -This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryPoolMXBean.html#getUsage--). - - -| Name | Instrument Type | Unit (UCUM) | Description | -| -------- | --------------- | ----------- | -------------- | -| `process.runtime.jvm.memory.init` | UpDownCounter | `By` | Measure of initial memory requested. | - - - -| Attribute | Type | Description | Examples | Requirement Level | -|---|---|---|---|---| -| `type` | string | The type of memory. | `heap`; `non_heap` | Recommended | -| `pool` | string | Name of the memory pool. [1] | `G1 Old Gen`; `G1 Eden space`; `G1 Survivor Space` | Recommended | - -**[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()). - -`type` MUST be one of the following: - -| Value | Description | -|---|---| -| `heap` | Heap memory. | -| `non_heap` | Non-heap memory | - - ### Metric: `process.runtime.jvm.memory.committed` This metric is [recommended][MetricRecommended]. @@ -312,6 +286,37 @@ and [`com.ibm.lang.management.OperatingSystemMXBean#getProcessCpuLoad()`](https: +## JVM Metrics (Experimental) + +**Description:** Experimental Java Virtual Machine (JVM) metrics captured under `process.runtime.jvm.` + +### Metric: `process.runtime.jvm.memory.init` + +This metric is [recommended][MetricRecommended]. +This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryPoolMXBean.html#getUsage--). + + +| Name | Instrument Type | Unit (UCUM) | Description | +| -------- | --------------- | ----------- | -------------- | +| `process.runtime.jvm.memory.init` | UpDownCounter | `By` | Measure of initial memory requested. | + + + +| Attribute | Type | Description | Examples | Requirement Level | +|---|---|---|---|---| +| `type` | string | The type of memory. | `heap`; `non_heap` | Recommended | +| `pool` | string | Name of the memory pool. [1] | `G1 Old Gen`; `G1 Eden space`; `G1 Survivor Space` | Recommended | + +**[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()). + +`type` MUST be one of the following: + +| Value | Description | +|---|---| +| `heap` | Heap memory. | +| `non_heap` | Non-heap memory | + + ### Metric: `process.runtime.jvm.system.cpu.utilization` This metric is [recommended][MetricRecommended].