Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add namespace to jvm metric attributes #3464

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
29 changes: 29 additions & 0 deletions schemas/1.21.0
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 8 additions & 6 deletions semantic_conventions/metrics/process-runtime-jvm-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
Expand Down Expand Up @@ -72,15 +72,15 @@ groups:
instrument: histogram
unit: "s"
attributes:
- id: gc
- id: gc.name
type: string
requirement_level: recommended
brief: Name of the garbage collector.
examples: ["G1 Young Generation", "G1 Old Generation"]
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.
Expand All @@ -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
Expand Down Expand Up @@ -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: >
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended).
<!-- semconv metric.process.runtime.jvm.memory.usage(full) -->
| 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 |
|---|---|
Expand All @@ -114,12 +114,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended).
<!-- semconv metric.process.runtime.jvm.memory.init(full) -->
| 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 |
|---|---|
Expand All @@ -140,12 +140,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended).
<!-- semconv metric.process.runtime.jvm.memory.committed(full) -->
| 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 |
|---|---|
Expand All @@ -166,12 +166,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended).
<!-- semconv metric.process.runtime.jvm.memory.limit(full) -->
| 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 |
|---|---|
Expand All @@ -192,12 +192,12 @@ This metric is [recommended](../metric-requirement-level.md#recommended).
<!-- semconv metric.process.runtime.jvm.memory.usage_after_last_gc(full) -->
| 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 |
|---|---|
Expand All @@ -222,8 +222,8 @@ of `[]` (single bucket histogram capturing count, sum, min, max).
<!-- semconv metric.process.runtime.jvm.gc.duration(full) -->
| 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()).

Expand All @@ -243,7 +243,7 @@ This metric is [recommended](../metric-requirement-level.md#recommended).
<!-- semconv metric.process.runtime.jvm.threads.count(full) -->
| 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 |
<!-- endsemconv -->

### Metric: `process.runtime.jvm.classes.loaded`
Expand Down Expand Up @@ -337,7 +337,7 @@ This metric is [recommended](../metric-requirement-level.md#recommended).
<!-- semconv metric.process.runtime.jvm.buffer.usage(full) -->
| 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()).
<!-- endsemconv -->
Expand All @@ -355,7 +355,7 @@ This metric is [recommended](../metric-requirement-level.md#recommended).
<!-- semconv metric.process.runtime.jvm.buffer.limit(full) -->
| 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()).
<!-- endsemconv -->
Expand All @@ -373,7 +373,7 @@ This metric is [recommended](../metric-requirement-level.md#recommended).
<!-- semconv metric.process.runtime.jvm.buffer.count(full) -->
| 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()).
<!-- endsemconv -->