diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dd794b70b..222d497641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -95,7 +95,21 @@ Note: This is the first release of Semantic Conventions separate from the Specif - Mark service.version as stable. ([#106](https://github.com/open-telemetry/semantic-conventions/pull/106)) - Mark initial set of HTTP semantic conventions as frozen - ([#105](https://github.com/open-telemetry/semantic-conventions/pull/105)) + ([#105](https://github.com/open-telemetry/semantic-conventions/pull/105)) +- BREAKING: Add namespaces to JVM metric attributes ([#20](https://github.com/open-telemetry/semantic-conventions/pull/20)). + - Memory metric attribute renames + - Applies to metrics + - `process.runtime.jvm.memory.usage` + - `process.runtime.jvm.memory.init` + - `process.runtime.jvm.memory.committed` + - `process.runtime.jvm.memory.limit` + - `process.runtime.jvm.memory.usage_after_last_gc` + - Rename `memory` to `memory.type` + - Rename `pool` to `memory.pool.name` + - Rename `process.runtime.jvm.gc.duration` metric attribute `gc` to `gc.name` + - Rename `process.runtime.jvm.gc.duration` metric attribute `action` to `gc.action` + - Rename `process.runtime.jvm.threads.count` metric attribute `daemon` to `thread.daemon` + - Rename `process.runtime.jvm.buffer` metric attribute `pool` to `buffer.pool.name` ## v1.20.0 (2023-04-07) diff --git a/schemas/1.21.0 b/schemas/1.21.0 index f458225c5c..80fe9cb7cf 100644 --- a/schemas/1.21.0 +++ b/schemas/1.21.0 @@ -50,6 +50,33 @@ versions: # https://github.com/open-telemetry/semantic-conventions/pull/53 - rename_metrics: process.runtime.jvm.cpu.utilization: process.runtime.jvm.cpu.recent_utilization + # https://github.com/open-telemetry/opentelemetry-specification/pull/3464 + - rename_attributes: + attribute_map: + type: memory.type + pool: memory.pool.name + apply_to_metrics: + - process.runtime.jvm.memory.usage + - process.runtime.jvm.memory.init + - process.runtime.jvm.memory.committed + - process.runtime.jvm.memory.limit + - process.runtime.jvm.memory.usage_after_last_gc + - rename_attributes: + attribute_map: + name: gc.name + action: gc.action + apply_to_metrics: + - process.runtime.jvm.gc.duration + - rename_attributes: + attribute_map: + daemon: thread.daemon + apply_to_metrics: + - process.runtime.jvm.threads.count + - rename_attributes: + attribute_map: + pool: buffer.pool.name + apply_to_metrics: + - process.runtime.jvm.buffer 1.20.0: spans: changes: diff --git a/semantic_conventions/metrics/process-runtime-jvm-metrics-experimental.yaml b/semantic_conventions/metrics/process-runtime-jvm-metrics-experimental.yaml index 6b5d5b60d4..998735bdc6 100644 --- a/semantic_conventions/metrics/process-runtime-jvm-metrics-experimental.yaml +++ b/semantic_conventions/metrics/process-runtime-jvm-metrics-experimental.yaml @@ -34,8 +34,11 @@ groups: - id: attributes.process.runtime.jvm.buffer type: attribute_group brief: "Describes JVM buffer metric attributes." + prefix: buffer attributes: - - ref: pool + - id: pool.name + type: string + requirement_level: recommended brief: Name of the buffer pool. examples: [ "mapped", "direct" ] note: > diff --git a/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml b/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml index 1721b8e956..1a556a59cf 100644 --- a/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml +++ b/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml @@ -2,6 +2,7 @@ groups: - id: attributes.process.runtime.jvm.memory type: attribute_group brief: "Describes JVM memory metric attributes." + prefix: memory attributes: - id: type type: @@ -16,7 +17,7 @@ groups: requirement_level: recommended brief: The type of memory. examples: ["heap", "non_heap"] - - id: pool + - id: pool.name type: string requirement_level: recommended brief: Name of the memory pool. @@ -63,8 +64,9 @@ groups: brief: "Duration of JVM garbage collection actions." instrument: histogram unit: "s" + prefix: gc attributes: - - id: gc + - id: name type: string requirement_level: recommended brief: Name of the garbage collector. @@ -87,6 +89,7 @@ groups: brief: "Number of executing platform threads." instrument: updowncounter unit: "{thread}" + prefix: thread attributes: - id: daemon brief: "Whether the thread is daemon or not." diff --git a/specification/metrics/semantic_conventions/runtime-environment-metrics.md b/specification/metrics/semantic_conventions/runtime-environment-metrics.md index faf21944cd..a4b4488573 100644 --- a/specification/metrics/semantic_conventions/runtime-environment-metrics.md +++ b/specification/metrics/semantic_conventions/runtime-environment-metrics.md @@ -91,12 +91,12 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle | 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 | +| `memory.type` | string | The type of memory. | `heap`; `non_heap` | Recommended | +| `memory.pool.name` | 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: +`memory.type` MUST be one of the following: | Value | Description | |---|---| @@ -118,12 +118,12 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle | 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 | +| `memory.type` | string | The type of memory. | `heap`; `non_heap` | Recommended | +| `memory.pool.name` | 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: +`memory.type` MUST be one of the following: | Value | Description | |---|---| @@ -145,12 +145,12 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle | 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 | +| `memory.type` | string | The type of memory. | `heap`; `non_heap` | Recommended | +| `memory.pool.name` | 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: +`memory.type` MUST be one of the following: | Value | Description | |---|---| @@ -172,12 +172,12 @@ This metric is obtained from [`MemoryPoolMXBean#getCollectionUsage()`](https://d | 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 | +| `memory.type` | string | The type of memory. | `heap`; `non_heap` | Recommended | +| `memory.pool.name` | 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: +`memory.type` MUST be one of the following: | Value | Description | |---|---| @@ -204,8 +204,8 @@ of `[]` (single bucket histogram capturing count, sum, min, max). | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `gc` | string | Name of the garbage collector. [1] | `G1 Young Generation`; `G1 Old Generation` | Recommended | -| `action` | string | Name of the garbage collector action. [2] | `end of minor GC`; `end of major GC` | Recommended | +| `gc.name` | string | Name of the garbage collector. [1] | `G1 Young Generation`; `G1 Old Generation` | Recommended | +| `gc.action` | string | Name of the garbage collector action. [2] | `end of minor GC`; `end of major GC` | Recommended | **[1]:** Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()). @@ -228,7 +228,7 @@ Note that this is the number of platform threads (as opposed to virtual threads) | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `daemon` | boolean | Whether the thread is daemon or not. | | Recommended | +| `thread.daemon` | boolean | Whether the thread is daemon or not. | | Recommended | ### Metric: `process.runtime.jvm.classes.loaded` @@ -323,12 +323,12 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle | 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 | +| `memory.type` | string | The type of memory. | `heap`; `non_heap` | Recommended | +| `memory.pool.name` | 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: +`memory.type` MUST be one of the following: | Value | Description | |---|---| @@ -379,7 +379,7 @@ This metric is obtained from [`BufferPoolMXBean#getMemoryUsed()`](https://docs.o | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `pool` | string | Name of the buffer pool. [1] | `mapped`; `direct` | Recommended | +| `buffer.pool.name` | string | Name of the buffer pool. [1] | `mapped`; `direct` | Recommended | **[1]:** 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()). @@ -398,7 +398,7 @@ This metric is obtained from [`BufferPoolMXBean#getTotalCapacity()`](https://doc | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `pool` | string | Name of the buffer pool. [1] | `mapped`; `direct` | Recommended | +| `buffer.pool.name` | string | Name of the buffer pool. [1] | `mapped`; `direct` | Recommended | **[1]:** 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()). @@ -417,7 +417,7 @@ This metric is obtained from [`BufferPoolMXBean#getCount()`](https://docs.oracle | Attribute | Type | Description | Examples | Requirement Level | |---|---|---|---|---| -| `pool` | string | Name of the buffer pool. [1] | `mapped`; `direct` | Recommended | +| `buffer.pool.name` | string | Name of the buffer pool. [1] | `mapped`; `direct` | Recommended | **[1]:** 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()).