diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b5f1f7b9d5..e72aac5c42d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,19 @@ release. ([#3390](https://github.com/open-telemetry/opentelemetry-specification/pull/3390)) - BREAKING: Remove `messaging.consumer.id`, make `messaging.client_id` generic ([#3336](https://github.com/open-telemetry/opentelemetry-specification/pull/3336)) +- Memory metric attribute renames + - Applies to metrics + - `metric.process.runtime.jvm.memory.usage` + - `metric.process.runtime.jvm.memory.init` + - `metric.process.runtime.jvm.memory.committed` + - `metric.process.runtime.jvm.memory.limit` + - `metric.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 `attributes.process.runtime.jvm.buffer` metric attribute `pool` to `buffer.pool.name` ### Compatibility diff --git a/schemas/1.21.0 b/schemas/1.21.0 index ab76d6e1a8d..7205d86394e 100644 --- a/schemas/1.21.0 +++ b/schemas/1.21.0 @@ -9,6 +9,35 @@ versions: attribute_map: messaging.kafka.client_id: messaging.client_id messaging.rocketmq.client_id: messaging.client_id + metrics: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/3464 + - rename_attributes: + attribute_map: + memory: memory.type + pool: memory.pool.name + apply_to_metrics: + - metric.process.runtime.jvm.memory.usage + - metric.process.runtime.jvm.memory.init + - metric.process.runtime.jvm.memory.committed + - metric.process.runtime.jvm.memory.limit + - metric.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: + - attributes.process.runtime.jvm.buffer 1.20.0: spans: changes: diff --git a/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml b/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml index 7efbdb824ff..65db1c95db9 100644 --- a/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml +++ b/semantic_conventions/metrics/process-runtime-jvm-metrics.yaml @@ -3,7 +3,7 @@ groups: type: attribute_group brief: "Describes JVM memory metric attributes." attributes: - - id: type + - id: memory.type type: allow_custom_values: false members: @@ -16,7 +16,7 @@ groups: requirement_level: recommended brief: The type of memory. examples: ["heap", "non_heap"] - - id: pool + - id: memory.pool.name type: string requirement_level: recommended brief: Name of the memory pool. @@ -72,7 +72,7 @@ groups: instrument: histogram unit: "s" attributes: - - id: gc + - id: gc.name type: string requirement_level: recommended brief: Name of the garbage collector. @@ -80,7 +80,7 @@ groups: note: > 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()). - - id: action + - id: gc.action type: string requirement_level: recommended brief: Name of the garbage collector action. @@ -96,7 +96,7 @@ groups: instrument: updowncounter unit: "{thread}" attributes: - - id: daemon + - id: thread.daemon brief: "Whether the thread is daemon or not." type: boolean requirement_level: recommended @@ -153,7 +153,9 @@ groups: type: attribute_group brief: "Describes JVM buffer metric attributes." attributes: - - ref: pool + - id: buffer.pool.name + type: string + requirement_level: recommended brief: Name of the buffer pool. examples: [ "mapped", "direct" ] note: > diff --git a/specification/metrics/semantic_conventions/runtime-environment-metrics.md b/specification/metrics/semantic_conventions/runtime-environment-metrics.md index 85058b9a062..6d210a0adc6 100644 --- a/specification/metrics/semantic_conventions/runtime-environment-metrics.md +++ b/specification/metrics/semantic_conventions/runtime-environment-metrics.md @@ -88,12 +88,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended). | 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 | |---|---| @@ -114,12 +114,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended). | 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 | |---|---| @@ -140,12 +140,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended). | 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 | |---|---| @@ -166,12 +166,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended). | 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 | |---|---| @@ -192,12 +192,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended). | 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 | |---|---| @@ -222,8 +222,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()). @@ -243,7 +243,7 @@ This metric is [recommended](../metric-requirement-level.md#recommended). | 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` @@ -337,7 +337,7 @@ This metric is [recommended](../metric-requirement-level.md#recommended). | 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()). @@ -355,7 +355,7 @@ This metric is [recommended](../metric-requirement-level.md#recommended). | 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()). @@ -373,7 +373,7 @@ This metric is [recommended](../metric-requirement-level.md#recommended). | 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()).