Remove pluralization from JVM metric namespaces (#252)

This commit is contained in:
Trask Stalnaker 2023-08-17 08:45:02 -07:00 committed by GitHub
parent a42aecc6b8
commit 098db1ca51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 33 deletions

View File

@ -55,6 +55,8 @@ release.
([#253](https://github.com/open-telemetry/semantic-conventions/pull/253)) ([#253](https://github.com/open-telemetry/semantic-conventions/pull/253))
- BREAKING: Rename `jvm.classes.current_loaded` metrics to `jvm.classes.count` - BREAKING: Rename `jvm.classes.current_loaded` metrics to `jvm.classes.count`
([#60](https://github.com/open-telemetry/semantic-conventions/pull/60)) ([#60](https://github.com/open-telemetry/semantic-conventions/pull/60))
- BREAKING: Remove pluralization from JVM metric namespaces.
([#252](https://github.com/open-telemetry/semantic-conventions/pull/252))
## v1.21.0 (2023-07-13) ## v1.21.0 (2023-07-13)

View File

@ -25,10 +25,10 @@ semantic conventions when instrumenting runtime environments.
* [Metric: `jvm.memory.limit`](#metric-jvmmemorylimit) * [Metric: `jvm.memory.limit`](#metric-jvmmemorylimit)
* [Metric: `jvm.memory.usage_after_last_gc`](#metric-jvmmemoryusage_after_last_gc) * [Metric: `jvm.memory.usage_after_last_gc`](#metric-jvmmemoryusage_after_last_gc)
* [Metric: `jvm.gc.duration`](#metric-jvmgcduration) * [Metric: `jvm.gc.duration`](#metric-jvmgcduration)
* [Metric: `jvm.threads.count`](#metric-jvmthreadscount) * [Metric: `jvm.thread.count`](#metric-jvmthreadcount)
* [Metric: `jvm.classes.loaded`](#metric-jvmclassesloaded) * [Metric: `jvm.class.loaded`](#metric-jvmclassloaded)
* [Metric: `jvm.classes.unloaded`](#metric-jvmclassesunloaded) * [Metric: `jvm.class.unloaded`](#metric-jvmclassunloaded)
* [Metric: `jvm.classes.count`](#metric-jvmclassescount) * [Metric: `jvm.class.count`](#metric-jvmclasscount)
* [Metric: `jvm.cpu.time`](#metric-jvmcputime) * [Metric: `jvm.cpu.time`](#metric-jvmcputime)
* [Metric: `jvm.cpu.count`](#metric-jvmcpucount) * [Metric: `jvm.cpu.count`](#metric-jvmcpucount)
* [Metric: `jvm.cpu.recent_utilization`](#metric-jvmcpurecent_utilization) * [Metric: `jvm.cpu.recent_utilization`](#metric-jvmcpurecent_utilization)
@ -213,65 +213,65 @@ of `[]` (single bucket histogram capturing count, sum, min, max).
**[2]:** Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()). **[2]:** Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).
<!-- endsemconv --> <!-- endsemconv -->
### Metric: `jvm.threads.count` ### Metric: `jvm.thread.count`
This metric is [recommended][MetricRecommended]. This metric is [recommended][MetricRecommended].
This metric is obtained from [`ThreadMXBean#getDaemonThreadCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ThreadMXBean.html#getDaemonThreadCount--) and This metric is obtained from [`ThreadMXBean#getDaemonThreadCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ThreadMXBean.html#getDaemonThreadCount--) and
[`ThreadMXBean#getThreadCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ThreadMXBean.html#getThreadCount--). [`ThreadMXBean#getThreadCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ThreadMXBean.html#getThreadCount--).
Note that this is the number of platform threads (as opposed to virtual threads). Note that this is the number of platform threads (as opposed to virtual threads).
<!-- semconv metric.jvm.threads.count(metric_table) --> <!-- semconv metric.jvm.thread.count(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | | Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- | | -------- | --------------- | ----------- | -------------- |
| `jvm.threads.count` | UpDownCounter | `{thread}` | Number of executing platform threads. | | `jvm.thread.count` | UpDownCounter | `{thread}` | Number of executing platform threads. |
<!-- endsemconv --> <!-- endsemconv -->
<!-- semconv metric.jvm.threads.count(full) --> <!-- semconv metric.jvm.thread.count(full) -->
| Attribute | Type | Description | Examples | Requirement Level | | Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---| |---|---|---|---|---|
| [`thread.daemon`](../general/attributes.md) | 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.class.loaded`
This metric is [recommended][MetricRecommended]. This metric is [recommended][MetricRecommended].
This metric is obtained from [`ClassLoadingMXBean#getTotalLoadedClassCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ClassLoadingMXBean.html#getTotalLoadedClassCount--). This metric is obtained from [`ClassLoadingMXBean#getTotalLoadedClassCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ClassLoadingMXBean.html#getTotalLoadedClassCount--).
<!-- semconv metric.jvm.classes.loaded(metric_table) --> <!-- semconv metric.jvm.class.loaded(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | | Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- | | -------- | --------------- | ----------- | -------------- |
| `jvm.classes.loaded` | Counter | `{class}` | Number of classes loaded since JVM start. | | `jvm.class.loaded` | Counter | `{class}` | Number of classes loaded since JVM start. |
<!-- endsemconv --> <!-- endsemconv -->
<!-- semconv metric.jvm.classes.loaded(full) --> <!-- semconv metric.jvm.class.loaded(full) -->
<!-- endsemconv --> <!-- endsemconv -->
### Metric: `jvm.classes.unloaded` ### Metric: `jvm.class.unloaded`
This metric is [recommended][MetricRecommended]. This metric is [recommended][MetricRecommended].
This metric is obtained from [`ClassLoadingMXBean#getUnloadedClassCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ClassLoadingMXBean.html#getUnloadedClassCount--). This metric is obtained from [`ClassLoadingMXBean#getUnloadedClassCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ClassLoadingMXBean.html#getUnloadedClassCount--).
<!-- semconv metric.jvm.classes.unloaded(metric_table) --> <!-- semconv metric.jvm.class.unloaded(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | | Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- | | -------- | --------------- | ----------- | -------------- |
| `jvm.classes.unloaded` | Counter | `{class}` | Number of classes unloaded since JVM start. | | `jvm.class.unloaded` | Counter | `{class}` | Number of classes unloaded since JVM start. |
<!-- endsemconv --> <!-- endsemconv -->
<!-- semconv metric.jvm.classes.unloaded(full) --> <!-- semconv metric.jvm.class.unloaded(full) -->
<!-- endsemconv --> <!-- endsemconv -->
### Metric: `jvm.classes.count` ### Metric: `jvm.class.count`
This metric is [recommended][MetricRecommended]. This metric is [recommended][MetricRecommended].
This metric is obtained from [`ClassLoadingMXBean#getLoadedClassCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ClassLoadingMXBean.html#getLoadedClassCount--). This metric is obtained from [`ClassLoadingMXBean#getLoadedClassCount()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/ClassLoadingMXBean.html#getLoadedClassCount--).
<!-- semconv metric.jvm.classes.count(metric_table) --> <!-- semconv metric.jvm.class.count(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description | | Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- | | -------- | --------------- | ----------- | -------------- |
| `jvm.classes.count` | UpDownCounter | `{class}` | Number of classes currently loaded. | | `jvm.class.count` | UpDownCounter | `{class}` | Number of classes currently loaded. |
<!-- endsemconv --> <!-- endsemconv -->
<!-- semconv metric.jvm.classes.count(full) --> <!-- semconv metric.jvm.class.count(full) -->
<!-- endsemconv --> <!-- endsemconv -->
### Metric: `jvm.cpu.time` ### Metric: `jvm.cpu.time`

View File

@ -83,9 +83,9 @@ groups:
Garbage collector action is generally obtained via Garbage collector action is generally obtained via
[GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()). [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).
- id: metric.jvm.threads.count - id: metric.jvm.thread.count
type: metric type: metric
metric_name: jvm.threads.count metric_name: jvm.thread.count
brief: "Number of executing platform threads." brief: "Number of executing platform threads."
instrument: updowncounter instrument: updowncounter
unit: "{thread}" unit: "{thread}"
@ -93,23 +93,23 @@ groups:
- ref: thread.daemon - ref: thread.daemon
requirement_level: recommended requirement_level: recommended
- id: metric.jvm.classes.loaded - id: metric.jvm.class.loaded
type: metric type: metric
metric_name: jvm.classes.loaded metric_name: jvm.class.loaded
brief: "Number of classes loaded since JVM start." brief: "Number of classes loaded since JVM start."
instrument: counter instrument: counter
unit: "{class}" unit: "{class}"
- id: metric.jvm.classes.unloaded - id: metric.jvm.class.unloaded
type: metric type: metric
metric_name: jvm.classes.unloaded metric_name: jvm.class.unloaded
brief: "Number of classes unloaded since JVM start." brief: "Number of classes unloaded since JVM start."
instrument: counter instrument: counter
unit: "{class}" unit: "{class}"
- id: metric.jvm.classes.count - id: metric.jvm.class.count
type: metric type: metric
metric_name: jvm.classes.count metric_name: jvm.class.count
brief: "Number of classes currently loaded." brief: "Number of classes currently loaded."
instrument: updowncounter instrument: updowncounter
unit: "{class}" unit: "{class}"

View File

@ -15,11 +15,15 @@ versions:
process.runtime.jvm.memory.limit: jvm.memory.limit process.runtime.jvm.memory.limit: jvm.memory.limit
process.runtime.jvm.memory.usage_after_last_gc: jvm.memory.usage_after_last_gc process.runtime.jvm.memory.usage_after_last_gc: jvm.memory.usage_after_last_gc
process.runtime.jvm.gc.duration: jvm.gc.duration process.runtime.jvm.gc.duration: jvm.gc.duration
process.runtime.jvm.threads.count: jvm.threads.count # also https://github.com/open-telemetry/semantic-conventions/pull/252
process.runtime.jvm.classes.loaded: jvm.classes.loaded process.runtime.jvm.threads.count: jvm.thread.count
process.runtime.jvm.classes.unloaded: jvm.classes.unloaded # also https://github.com/open-telemetry/semantic-conventions/pull/252
# https://github.com/open-telemetry/semantic-conventions/pull/60 process.runtime.jvm.classes.loaded: jvm.class.loaded
process.runtime.jvm.classes.current_loaded: jvm.classes.count # also https://github.com/open-telemetry/semantic-conventions/pull/252
process.runtime.jvm.classes.unloaded: jvm.class.unloaded
# also https://github.com/open-telemetry/semantic-conventions/pull/252
# and https://github.com/open-telemetry/semantic-conventions/pull/60
process.runtime.jvm.classes.current_loaded: jvm.class.count
process.runtime.jvm.cpu.time: jvm.cpu.time process.runtime.jvm.cpu.time: jvm.cpu.time
process.runtime.jvm.cpu.recent_utilization: jvm.cpu.recent_utilization process.runtime.jvm.cpu.recent_utilization: jvm.cpu.recent_utilization
process.runtime.jvm.memory.init: jvm.memory.init process.runtime.jvm.memory.init: jvm.memory.init