Skip to content

Commit 374c34c

Browse files
authored
Add metric for jvm memory usage after gc (#2901)
1 parent 9c276c3 commit 374c34c

File tree

2 files changed

+24
-20
lines changed

2 files changed

+24
-20
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ release.
3333
([#2827](https://github.com/open-telemetry/opentelemetry-specification/pull/2827))
3434
- Add more semantic convetion attributes of Apache RocketMQ
3535
([#2881](https://github.com/open-telemetry/opentelemetry-specification/pull/2881))
36+
- Add `process.runtime.jvm.memory.usage_after_last_gc` metric to semantic conventions.
37+
([#2901](https://github.com/open-telemetry/opentelemetry-specification/pull/2901))
3638

3739
### Compatibility
3840

specification/metrics/semantic_conventions/runtime-environment-metrics.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,26 +61,28 @@ consider, for example pthreads vs green thread implementations.
6161

6262
All JVM metric attributes are required unless otherwise indicated.
6363

64-
| Name | Description | Unit | Unit ([UCUM](README.md#instrument-units)) | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values |
65-
|--------------------------------------------|----------------------------------------------------------|---------|-------------------------------------------|---------------------------------------------------|------------|---------------|-----------------------|
66-
| process.runtime.jvm.memory.usage | Measure of memory used | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` |
67-
| | | | | | | pool | Name of pool [1] |
68-
| process.runtime.jvm.memory.init | Measure of initial memory requested | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` |
69-
| | | | | | | pool | Name of pool [1] |
70-
| process.runtime.jvm.memory.committed | Measure of memory committed | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` |
71-
| | | | | | | pool | Name of pool [1] |
72-
| process.runtime.jvm.memory.limit | Measure of max obtainable memory | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` |
73-
| | | | | | | pool | Name of pool [1] |
74-
| process.runtime.jvm.threads.count | Number of executing threads | threads | `{threads}` | UpDownCounter | Int64 | daemon | `true`, `false` |
75-
| process.runtime.jvm.classes.loaded | Number of classes loaded since JVM start | classes | `{classes}` | Counter | Int64 | | |
76-
| process.runtime.jvm.classes.unloaded | Number of classes unloaded since JVM start | classes | `{classes}` | Counter | Int64 | | |
77-
| process.runtime.jvm.classes.current_loaded | Number of classes currently loaded | classes | `{classes}` | UpDownCounter | Int64 | | |
78-
| process.runtime.jvm.cpu.utilization | Recent cpu utilization for the process [2] | 1 | 1 | Asynchronous Gauge | Double | | |
79-
| process.runtime.jvm.system.cpu.utilization | Recent cpu utilization for the whole system [2] | 1 | 1 | Asynchronous Gauge | Double | | |
80-
| process.runtime.jvm.system.cpu.load_1m | Average CPU load of the whole system for the last minute | 1 | 1 | Asynchronous Gauge | Double | | |
81-
| process.runtime.jvm.buffer.usage | Measure of memory used by buffers | Bytes | `By` | UpDownCounter | Int64 | pool | Name of pool[3] |
82-
| process.runtime.jvm.buffer.limit | Measure of total memory capacity of buffers | Bytes | `By` | UpDownCounter | Int64 | pool | Name of pool[3] |
83-
| process.runtime.jvm.buffer.count | Number of buffers in the pool | buffers | `{buffers}` | UpDownCounter | Int64 | pool | Name of pool[3] |
64+
| Name | Description | Unit | Unit ([UCUM](README.md#instrument-units)) | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values |
65+
|------------------------------------------------|-------------------------------------------------------------------------------------------------|---------|-------------------------------------------|---------------------------------------------------|------------|---------------|-----------------------|
66+
| process.runtime.jvm.memory.usage | Measure of memory used | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` |
67+
| | | | | | | pool | Name of pool [1] |
68+
| process.runtime.jvm.memory.init | Measure of initial memory requested | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` |
69+
| | | | | | | pool | Name of pool [1] |
70+
| process.runtime.jvm.memory.committed | Measure of memory committed | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` |
71+
| | | | | | | pool | Name of pool [1] |
72+
| process.runtime.jvm.memory.limit | Measure of max obtainable memory | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` |
73+
| | | | | | | pool | Name of pool [1] |
74+
| process.runtime.jvm.memory.usage_after_last_gc | Measure of memory used, as measured after the most recent garbage collection event on this pool | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"nonheap"` |
75+
| | | | | | | pool | Name of pool [1] |
76+
| process.runtime.jvm.threads.count | Number of executing threads | threads | `{threads}` | UpDownCounter | Int64 | daemon | `true`, `false` |
77+
| process.runtime.jvm.classes.loaded | Number of classes loaded since JVM start | classes | `{classes}` | Counter | Int64 | | |
78+
| process.runtime.jvm.classes.unloaded | Number of classes unloaded since JVM start | classes | `{classes}` | Counter | Int64 | | |
79+
| process.runtime.jvm.classes.current_loaded | Number of classes currently loaded | classes | `{classes}` | UpDownCounter | Int64 | | |
80+
| process.runtime.jvm.cpu.utilization | Recent cpu utilization for the process [2] | 1 | 1 | Asynchronous Gauge | Double | | |
81+
| process.runtime.jvm.system.cpu.utilization | Recent cpu utilization for the whole system [2] | 1 | 1 | Asynchronous Gauge | Double | | |
82+
| process.runtime.jvm.system.cpu.load_1m | Average CPU load of the whole system for the last minute | 1 | 1 | Asynchronous Gauge | Double | | |
83+
| process.runtime.jvm.buffer.usage | Measure of memory used by buffers | Bytes | `By` | UpDownCounter | Int64 | pool | Name of pool[3] |
84+
| process.runtime.jvm.buffer.limit | Measure of total memory capacity of buffers | Bytes | `By` | UpDownCounter | Int64 | pool | Name of pool[3] |
85+
| process.runtime.jvm.buffer.count | Number of buffers in the pool | buffers | `{buffers}` | UpDownCounter | Int64 | pool | Name of pool[3] |
8486

8587
**[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()).
8688
Examples include `G1 Old Gen`, `G1 Eden space`, `G1 Survivor Space`, `Metaspace`, etc.

0 commit comments

Comments
 (0)