Skip to content

Commit

Permalink
Rename jvm.memory.usage to jvm.memory.used
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Nov 17, 2023
1 parent 48d3348 commit ebdc4ec
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 14 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ release.
([#495](https://github.com/open-telemetry/semantic-conventions/issues/495))
- Changed `messaging.system` attribute type to an open enum
([#517](https://github.com/open-telemetry/semantic-conventions/pull/517))
- Rename metrics `jvm.memory.usage` to `jvm.memory.used` and `jvm.memory.usage_after_last_gc`
to `jvm.memory.used_after_last_gc`
([#536](https://github.com/open-telemetry/semantic-conventions/pull/536))

### Features

Expand Down
20 changes: 10 additions & 10 deletions docs/runtime/jvm-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ This document describes semantic conventions for JVM metrics in OpenTelemetry.
<!-- toc -->

- [JVM Memory](#jvm-memory)
* [Metric: `jvm.memory.usage`](#metric-jvmmemoryusage)
* [Metric: `jvm.memory.used`](#metric-jvmmemoryused)
* [Metric: `jvm.memory.committed`](#metric-jvmmemorycommitted)
* [Metric: `jvm.memory.limit`](#metric-jvmmemorylimit)
* [Metric: `jvm.memory.usage_after_last_gc`](#metric-jvmmemoryusage_after_last_gc)
* [Metric: `jvm.memory.used_after_last_gc`](#metric-jvmmemoryused_after_last_gc)
- [JVM Garbage Collection](#jvm-garbage-collection)
* [Metric: `jvm.gc.duration`](#metric-jvmgcduration)
- [JVM Threads](#jvm-threads)
Expand All @@ -43,18 +43,18 @@ This document describes semantic conventions for JVM metrics in OpenTelemetry.

**Description:** Java Virtual Machine (JVM) metrics captured under the namespace `jvm.memory.*`

### Metric: `jvm.memory.usage`
### Metric: `jvm.memory.used`

This metric is [recommended][MetricRecommended].
This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryPoolMXBean.html#getUsage--).

<!-- semconv metric.jvm.memory.usage(metric_table) -->
<!-- semconv metric.jvm.memory.used(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `jvm.memory.usage` | UpDownCounter | `By` | Measure of memory used. |
| `jvm.memory.used` | UpDownCounter | `By` | Measure of memory used. |
<!-- endsemconv -->

<!-- semconv metric.jvm.memory.usage(full) -->
<!-- semconv metric.jvm.memory.used(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `jvm.memory.pool.name` | string | Name of the memory pool. [1] | `G1 Old Gen`; `G1 Eden space`; `G1 Survivor Space` | Recommended |
Expand Down Expand Up @@ -124,18 +124,18 @@ This metric is obtained from [`MemoryPoolMXBean#getUsage()`](https://docs.oracle
| `non_heap` | Non-heap memory |
<!-- endsemconv -->

### Metric: `jvm.memory.usage_after_last_gc`
### Metric: `jvm.memory.used_after_last_gc`

This metric is [recommended][MetricRecommended].
This metric is obtained from [`MemoryPoolMXBean#getCollectionUsage()`](https://docs.oracle.com/javase/8/docs/api/java/lang/management/MemoryPoolMXBean.html#getCollectionUsage--).

<!-- semconv metric.jvm.memory.usage_after_last_gc(metric_table) -->
<!-- semconv metric.jvm.memory.used_after_last_gc(metric_table) -->
| Name | Instrument Type | Unit (UCUM) | Description |
| -------- | --------------- | ----------- | -------------- |
| `jvm.memory.usage_after_last_gc` | UpDownCounter | `By` | Measure of memory used, as measured after the most recent garbage collection event on this pool. |
| `jvm.memory.used_after_last_gc` | UpDownCounter | `By` | Measure of memory used, as measured after the most recent garbage collection event on this pool. |
<!-- endsemconv -->

<!-- semconv metric.jvm.memory.usage_after_last_gc(full) -->
<!-- semconv metric.jvm.memory.used_after_last_gc(full) -->
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `jvm.memory.pool.name` | string | Name of the memory pool. [1] | `G1 Old Gen`; `G1 Eden space`; `G1 Survivor Space` | Recommended |
Expand Down
8 changes: 4 additions & 4 deletions model/metrics/jvm-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ groups:
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()).
- id: metric.jvm.memory.usage
- id: metric.jvm.memory.used
type: metric
metric_name: jvm.memory.usage
metric_name: jvm.memory.used
extends: attributes.jvm.memory
brief: "Measure of memory used."
instrument: updowncounter
Expand All @@ -50,9 +50,9 @@ groups:
instrument: updowncounter
unit: "By"

- id: metric.jvm.memory.usage_after_last_gc
- id: metric.jvm.memory.used_after_last_gc
type: metric
metric_name: jvm.memory.usage_after_last_gc
metric_name: jvm.memory.used_after_last_gc
extends: attributes.jvm.memory
brief: "Measure of memory used, as measured after the most recent garbage collection event on this pool."
instrument: updowncounter
Expand Down
4 changes: 4 additions & 0 deletions schema-next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ file_format: 1.1.0
schema_url: https://opentelemetry.io/schemas/next
versions:
next:
# https://github.com/open-telemetry/semantic-conventions/pull/536
- rename_metrics:
jvm.memory.usage: jvm.memory.used
jvm.memory.usage_after_last_gc: jvm.memory.used_after_last_gc
1.23.0:
metrics:
changes:
Expand Down

0 comments on commit ebdc4ec

Please sign in to comment.