add namespace to jvm metric attributes (#20)
This commit is contained in:
parent
a0143da118
commit
2927d5809b
19
CHANGELOG.md
19
CHANGELOG.md
|
|
@ -26,6 +26,25 @@ release.
|
||||||
clients invoking them.
|
clients invoking them.
|
||||||
- BREAKING: Rename all JVM metrics from `process.runtime.jvm.*` to `jvm.*`
|
- BREAKING: Rename all JVM metrics from `process.runtime.jvm.*` to `jvm.*`
|
||||||
([#241](https://github.com/open-telemetry/semantic-conventions/pull/241))
|
([#241](https://github.com/open-telemetry/semantic-conventions/pull/241))
|
||||||
|
- BREAKING: Add namespaces to JVM metric attributes ([#20](https://github.com/open-telemetry/semantic-conventions/pull/20)).
|
||||||
|
- Rename attributes `type` to `jvm.memory.type`, `pool` to `jvm.memory.pool.name`
|
||||||
|
- Applies to metrics:
|
||||||
|
- `jvm.memory.usage`
|
||||||
|
- `jvm.memory.init`
|
||||||
|
- `jvm.memory.committed`
|
||||||
|
- `jvm.memory.limit`
|
||||||
|
- `jvm.memory.usage_after_last_gc`
|
||||||
|
- Rename attributes `gc` to `jvm.gc.name`, `action` to `jvm.gc.action`
|
||||||
|
- Applies to metrics:
|
||||||
|
- `jvm.gc.duration`
|
||||||
|
- Rename attribute `daemon` to `thread.daemon`
|
||||||
|
- Applies to metrics:
|
||||||
|
- `jvm.threads.count`
|
||||||
|
- Rename attribute `pool` to `jvm.buffer.pool.name`
|
||||||
|
- Applies to metrics:
|
||||||
|
- `jvm.buffer.usage`
|
||||||
|
- `jvm.buffer.limit`
|
||||||
|
- `jvm.buffer.count`
|
||||||
|
|
||||||
## v1.21.0 (2023-07-13)
|
## v1.21.0 (2023-07-13)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -368,6 +368,7 @@ a thread that started a span.
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `thread.id` | int | Current "managed" thread ID (as opposed to OS thread ID). | `42` | Recommended |
|
| `thread.id` | int | Current "managed" thread ID (as opposed to OS thread ID). | `42` | Recommended |
|
||||||
| `thread.name` | string | Current thread name. | `main` | Recommended |
|
| `thread.name` | string | Current thread name. | `main` | Recommended |
|
||||||
|
| `thread.daemon` | boolean | Whether the thread is daemon or not. | | Recommended |
|
||||||
<!-- endsemconv -->
|
<!-- endsemconv -->
|
||||||
|
|
||||||
Examples of where `thread.id` and `thread.name` can be extracted from:
|
Examples of where `thread.id` and `thread.name` can be extracted from:
|
||||||
|
|
|
||||||
|
|
@ -91,12 +91,12 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle
|
||||||
<!-- semconv metric.jvm.memory.usage(full) -->
|
<!-- semconv metric.jvm.memory.usage(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `type` | string | The type of memory. | `heap`; `non_heap` | Recommended |
|
| `jvm.memory.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 |
|
| `jvm.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()).
|
**[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:
|
`jvm.memory.type` MUST be one of the following:
|
||||||
|
|
||||||
| Value | Description |
|
| Value | Description |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|
@ -118,12 +118,12 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle
|
||||||
<!-- semconv metric.jvm.memory.committed(full) -->
|
<!-- semconv metric.jvm.memory.committed(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `type` | string | The type of memory. | `heap`; `non_heap` | Recommended |
|
| `jvm.memory.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 |
|
| `jvm.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()).
|
**[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:
|
`jvm.memory.type` MUST be one of the following:
|
||||||
|
|
||||||
| Value | Description |
|
| Value | Description |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|
@ -145,12 +145,12 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle
|
||||||
<!-- semconv metric.jvm.memory.limit(full) -->
|
<!-- semconv metric.jvm.memory.limit(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `type` | string | The type of memory. | `heap`; `non_heap` | Recommended |
|
| `jvm.memory.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 |
|
| `jvm.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()).
|
**[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:
|
`jvm.memory.type` MUST be one of the following:
|
||||||
|
|
||||||
| Value | Description |
|
| Value | Description |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|
@ -172,12 +172,12 @@ This metric is obtained from [`MemoryPoolMXBean#getCollectionUsage()`](https://d
|
||||||
<!-- semconv metric.jvm.memory.usage_after_last_gc(full) -->
|
<!-- semconv metric.jvm.memory.usage_after_last_gc(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `type` | string | The type of memory. | `heap`; `non_heap` | Recommended |
|
| `jvm.memory.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 |
|
| `jvm.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()).
|
**[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:
|
`jvm.memory.type` MUST be one of the following:
|
||||||
|
|
||||||
| Value | Description |
|
| Value | Description |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|
@ -204,8 +204,8 @@ of `[]` (single bucket histogram capturing count, sum, min, max).
|
||||||
<!-- semconv metric.jvm.gc.duration(full) -->
|
<!-- semconv metric.jvm.gc.duration(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `gc` | string | Name of the garbage collector. [1] | `G1 Young Generation`; `G1 Old Generation` | Recommended |
|
| `jvm.gc.name` | 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 |
|
| `jvm.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()).
|
**[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)
|
||||||
<!-- semconv metric.jvm.threads.count(full) -->
|
<!-- semconv metric.jvm.threads.count(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `daemon` | boolean | Whether the thread is daemon or not. | | Recommended |
|
| [`thread.daemon`](../general/attributes.md) | boolean | Whether the thread is daemon or not. | | Recommended |
|
||||||
<!-- endsemconv -->
|
<!-- endsemconv -->
|
||||||
|
|
||||||
### Metric: `jvm.classes.loaded`
|
### Metric: `jvm.classes.loaded`
|
||||||
|
|
@ -325,12 +325,12 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle
|
||||||
<!-- semconv metric.jvm.memory.init(full) -->
|
<!-- semconv metric.jvm.memory.init(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `type` | string | The type of memory. | `heap`; `non_heap` | Recommended |
|
| `jvm.memory.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 |
|
| `jvm.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()).
|
**[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:
|
`jvm.memory.type` MUST be one of the following:
|
||||||
|
|
||||||
| Value | Description |
|
| Value | Description |
|
||||||
|---|---|
|
|---|---|
|
||||||
|
|
@ -385,7 +385,7 @@ This metric is obtained from [`BufferPoolMXBean#getMemoryUsed()`](https://docs.o
|
||||||
<!-- semconv metric.jvm.buffer.usage(full) -->
|
<!-- semconv metric.jvm.buffer.usage(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `pool` | string | Name of the buffer pool. [1] | `mapped`; `direct` | Recommended |
|
| `jvm.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()).
|
**[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 -->
|
<!-- endsemconv -->
|
||||||
|
|
@ -404,7 +404,7 @@ This metric is obtained from [`BufferPoolMXBean#getTotalCapacity()`](https://doc
|
||||||
<!-- semconv metric.jvm.buffer.limit(full) -->
|
<!-- semconv metric.jvm.buffer.limit(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `pool` | string | Name of the buffer pool. [1] | `mapped`; `direct` | Recommended |
|
| `jvm.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()).
|
**[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 -->
|
<!-- endsemconv -->
|
||||||
|
|
@ -423,7 +423,7 @@ This metric is obtained from [`BufferPoolMXBean#getCount()`](https://docs.oracle
|
||||||
<!-- semconv metric.jvm.buffer.count(full) -->
|
<!-- semconv metric.jvm.buffer.count(full) -->
|
||||||
| Attribute | Type | Description | Examples | Requirement Level |
|
| Attribute | Type | Description | Examples | Requirement Level |
|
||||||
|---|---|---|---|---|
|
|---|---|---|---|---|
|
||||||
| `pool` | string | Name of the buffer pool. [1] | `mapped`; `direct` | Recommended |
|
| `jvm.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()).
|
**[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 -->
|
<!-- endsemconv -->
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,11 @@ groups:
|
||||||
- id: attributes.jvm.buffer
|
- id: attributes.jvm.buffer
|
||||||
type: attribute_group
|
type: attribute_group
|
||||||
brief: "Describes JVM buffer metric attributes."
|
brief: "Describes JVM buffer metric attributes."
|
||||||
|
prefix: jvm.buffer
|
||||||
attributes:
|
attributes:
|
||||||
- ref: pool
|
- id: pool.name
|
||||||
|
type: string
|
||||||
|
requirement_level: recommended
|
||||||
brief: Name of the buffer pool.
|
brief: Name of the buffer pool.
|
||||||
examples: [ "mapped", "direct" ]
|
examples: [ "mapped", "direct" ]
|
||||||
note: >
|
note: >
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ groups:
|
||||||
- id: attributes.jvm.memory
|
- id: attributes.jvm.memory
|
||||||
type: attribute_group
|
type: attribute_group
|
||||||
brief: "Describes JVM memory metric attributes."
|
brief: "Describes JVM memory metric attributes."
|
||||||
|
prefix: jvm.memory
|
||||||
attributes:
|
attributes:
|
||||||
- id: type
|
- id: type
|
||||||
type:
|
type:
|
||||||
|
|
@ -16,7 +17,7 @@ groups:
|
||||||
requirement_level: recommended
|
requirement_level: recommended
|
||||||
brief: The type of memory.
|
brief: The type of memory.
|
||||||
examples: ["heap", "non_heap"]
|
examples: ["heap", "non_heap"]
|
||||||
- id: pool
|
- id: pool.name
|
||||||
type: string
|
type: string
|
||||||
requirement_level: recommended
|
requirement_level: recommended
|
||||||
brief: Name of the memory pool.
|
brief: Name of the memory pool.
|
||||||
|
|
@ -63,8 +64,9 @@ groups:
|
||||||
brief: "Duration of JVM garbage collection actions."
|
brief: "Duration of JVM garbage collection actions."
|
||||||
instrument: histogram
|
instrument: histogram
|
||||||
unit: "s"
|
unit: "s"
|
||||||
|
prefix: jvm.gc
|
||||||
attributes:
|
attributes:
|
||||||
- id: gc
|
- id: name
|
||||||
type: string
|
type: string
|
||||||
requirement_level: recommended
|
requirement_level: recommended
|
||||||
brief: Name of the garbage collector.
|
brief: Name of the garbage collector.
|
||||||
|
|
@ -88,9 +90,7 @@ groups:
|
||||||
instrument: updowncounter
|
instrument: updowncounter
|
||||||
unit: "{thread}"
|
unit: "{thread}"
|
||||||
attributes:
|
attributes:
|
||||||
- id: daemon
|
- ref: thread.daemon
|
||||||
brief: "Whether the thread is daemon or not."
|
|
||||||
type: boolean
|
|
||||||
requirement_level: recommended
|
requirement_level: recommended
|
||||||
|
|
||||||
- id: metric.jvm.classes.loaded
|
- id: metric.jvm.classes.loaded
|
||||||
|
|
|
||||||
|
|
@ -215,6 +215,9 @@ groups:
|
||||||
brief: >
|
brief: >
|
||||||
Current thread name.
|
Current thread name.
|
||||||
examples: main
|
examples: main
|
||||||
|
- id: daemon
|
||||||
|
brief: "Whether the thread is daemon or not."
|
||||||
|
type: boolean
|
||||||
- id: code
|
- id: code
|
||||||
prefix: code
|
prefix: code
|
||||||
type: span
|
type: span
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,35 @@ versions:
|
||||||
process.runtime.jvm.buffer.usage: jvm.buffer.usage
|
process.runtime.jvm.buffer.usage: jvm.buffer.usage
|
||||||
process.runtime.jvm.buffer.limit: jvm.buffer.limit
|
process.runtime.jvm.buffer.limit: jvm.buffer.limit
|
||||||
process.runtime.jvm.buffer.count: jvm.buffer.count
|
process.runtime.jvm.buffer.count: jvm.buffer.count
|
||||||
|
# https://github.com/open-telemetry/semantic-conventions/pull/20
|
||||||
|
- rename_attributes:
|
||||||
|
attribute_map:
|
||||||
|
type: jvm.memory.type
|
||||||
|
pool: jvm.memory.pool.name
|
||||||
|
apply_to_metrics:
|
||||||
|
- jvm.memory.usage
|
||||||
|
- jvm.memory.committed
|
||||||
|
- jvm.memory.limit
|
||||||
|
- jvm.memory.usage_after_last_gc
|
||||||
|
- jvm.memory.init
|
||||||
|
- rename_attributes:
|
||||||
|
attribute_map:
|
||||||
|
name: jvm.gc.name
|
||||||
|
action: jvm.gc.action
|
||||||
|
apply_to_metrics:
|
||||||
|
- jvm.gc.duration
|
||||||
|
- rename_attributes:
|
||||||
|
attribute_map:
|
||||||
|
daemon: thread.daemon
|
||||||
|
apply_to_metrics:
|
||||||
|
- jvm.threads.count
|
||||||
|
- rename_attributes:
|
||||||
|
attribute_map:
|
||||||
|
pool: jvm.buffer.pool.name
|
||||||
|
apply_to_metrics:
|
||||||
|
- jvm.buffer.usage
|
||||||
|
- jvm.buffer.limit
|
||||||
|
- jvm.buffer.count
|
||||||
1.21.0:
|
1.21.0:
|
||||||
spans:
|
spans:
|
||||||
changes:
|
changes:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue