Skip to content

Commit 9a111c7

Browse files
committed
Add additional process metrics to the metrics semantic conventions
Add the following: - `process.open_file_descriptors` - `process.open_handles` - `process.voluntary_ctx_switches` - `process.involuntary_ctx_switches`
1 parent a0a5dcc commit 9a111c7

File tree

2 files changed

+19
-12
lines changed

2 files changed

+19
-12
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ release.
2424
([#2619](https://github.com/open-telemetry/opentelemetry-specification/pull/2619)).
2525
- Clarify async instrument callback identity.
2626
([#2538](https://github.com/open-telemetry/opentelemetry-specification/pull/2538)).
27+
- Add `process.open_file_descriptors`, `process.open_handles`,
28+
`process.voluntary_ctx_switches`, `process.involuntary_ctx_switches` to the
29+
metrics semantic conventions.
2730

2831
### Logs
2932

specification/metrics/semantic_conventions/process-metrics.md

+16-12
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,22 @@ metrics](runtime-environment-metrics.md).
3131

3232
Below is a table of Process metric instruments.
3333

34-
| Name | Instrument Type ([\*](README.md#instrument-types)) | Unit | Description | Labels |
35-
| --------------------------------- | -------------------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36-
| `process.cpu.time` | Counter | s | Total CPU seconds broken down by different states. | `state`, if specified, SHOULD be one of: `system`, `user`, `wait`. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. |
37-
| `process.cpu.utilization` | Gauge | s | Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. | `state`, if specified, SHOULD be one of: `system`, `user`, `wait`. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. |
38-
| `process.memory.usage` | UpDownCounter | By | The amount of physical memory in use. | |
39-
| `process.memory.virtual` | UpDownCounter | By | The amount of committed virtual memory. | |
40-
| `process.disk.io` (deprecated) | Counter | By | Disk bytes transferred. | `direction` SHOULD be one of: `read`, `write` |
41-
| `process.disk.io.read` | Counter | By | Disk bytes read. | |
42-
| `process.disk.io.write` | Counter | By | Disk bytes written. | |
43-
| `process.network.io` (deprecated) | Counter | By | Network bytes transferred. | `direction` SHOULD be one of: `receive`, `transmit` |
44-
| `process.network.io.receive` | Counter | By | Network bytes received. | |
45-
| `process.network.io.transmit` | Counter | By | Network bytes transmitted. | |
34+
| Name | Instrument Type ([\*](README.md#instrument-types)) | Unit | Description | Labels |
35+
| ---------------------------------- | -------------------------------------------------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
36+
| `process.cpu.time` | Counter | s | Total CPU seconds broken down by different states. | `state`, if specified, SHOULD be one of: `system`, `user`, `wait`. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. |
37+
| `process.cpu.utilization` | Gauge | s | Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. | `state`, if specified, SHOULD be one of: `system`, `user`, `wait`. A process SHOULD be characterized _either_ by data points with no `state` labels, _or only_ data points with `state` labels. |
38+
| `process.memory.usage` | UpDownCounter | By | The amount of physical memory in use. | |
39+
| `process.memory.virtual` | UpDownCounter | By | The amount of committed virtual memory. | |
40+
| `process.disk.io` (deprecated) | Counter | By | Disk bytes transferred. | `direction` SHOULD be one of: `read`, `write` |
41+
| `process.disk.io.read` | Counter | By | Disk bytes read. | |
42+
| `process.disk.io.write` | Counter | By | Disk bytes written. | |
43+
| `process.network.io` (deprecated) | Counter | By | Network bytes transferred. | `direction` SHOULD be one of: `receive`, `transmit` |
44+
| `process.network.io.receive` | Counter | By | Network bytes received. | |
45+
| `process.network.io.transmit` | Counter | By | Network bytes transmitted. | |
46+
| `process.open_file_descriptors` | UpDownCounter | {file descriptors} | Number of file descriptors in use by the process. |
47+
| `process.open_handles` | UpDownCounter | {open handles} | Number of handles in use by the process. |
48+
| `process.voluntary_ctx_switches` | Counter | {context switches} | Number of times the process has been voluntarily context switched. |
49+
| `process.involuntary_ctx_switches` | Counter | {context switches} | Number of times the process has been involuntarily context switched. |
4650

4751
## Attributes
4852

0 commit comments

Comments
 (0)