From a9cc1f732927315f752d4b56a1081e6bc19dd426 Mon Sep 17 00:00:00 2001 From: Evan Bradley Date: Tue, 2 Aug 2022 13:25:27 -0400 Subject: [PATCH] Add additional process metrics to the metrics semantic conventions Add the following: - `process.voluntary_context_switches` - `process.involuntary_context_switches` - `process.open_file_descriptors` --- CHANGELOG.md | 3 +++ .../semantic_conventions/process-metrics.md | 27 ++++++++++--------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe012840717..7f621aff803 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,9 @@ release. ([#2619](https://github.com/open-telemetry/opentelemetry-specification/pull/2619)). - Clarify async instrument callback identity. ([#2538](https://github.com/open-telemetry/opentelemetry-specification/pull/2538)). +- Add `process.voluntary_context_switches`, `process.involuntary_context_switches`, + and `process.open_file_descriptors`, to the metrics semantic conventions + ([#2706](https://github.com/open-telemetry/opentelemetry-specification/pull/2706)). ### Logs diff --git a/specification/metrics/semantic_conventions/process-metrics.md b/specification/metrics/semantic_conventions/process-metrics.md index bc4c5750784..29d945c2a37 100644 --- a/specification/metrics/semantic_conventions/process-metrics.md +++ b/specification/metrics/semantic_conventions/process-metrics.md @@ -31,18 +31,21 @@ metrics](runtime-environment-metrics.md). Below is a table of Process metric instruments. -| Name | Instrument Type ([\*](README.md#instrument-types)) | Unit | Description | Labels | -| --------------------------------- | -------------------------------------------------- | ---- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `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. | -| `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. | -| `process.memory.usage` | UpDownCounter | By | The amount of physical memory in use. | | -| `process.memory.virtual` | UpDownCounter | By | The amount of committed virtual memory. | | -| `process.disk.io` (deprecated) | Counter | By | Disk bytes transferred. | `direction` SHOULD be one of: `read`, `write` | -| `process.disk.io.read` | Counter | By | Disk bytes read. | | -| `process.disk.io.write` | Counter | By | Disk bytes written. | | -| `process.network.io` (deprecated) | Counter | By | Network bytes transferred. | `direction` SHOULD be one of: `receive`, `transmit` | -| `process.network.io.receive` | Counter | By | Network bytes received. | | -| `process.network.io.transmit` | Counter | By | Network bytes transmitted. | | +| Name | Instrument Type ([\*](README.md#instrument-types)) | Unit ([UCUM](README.md#instrument-units)) | Description | Labels | +| -------------------------------------- | -------------------------------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `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. | +| `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. | +| `process.memory.usage` | UpDownCounter | By | The amount of physical memory in use. | | +| `process.memory.virtual` | UpDownCounter | By | The amount of committed virtual memory. | | +| `process.disk.io` (deprecated) | Counter | By | Disk bytes transferred. | `direction` SHOULD be one of: `read`, `write` | +| `process.disk.io.read` | Counter | By | Disk bytes read. | | +| `process.disk.io.write` | Counter | By | Disk bytes written. | | +| `process.network.io` (deprecated) | Counter | By | Network bytes transferred. | `direction` SHOULD be one of: `receive`, `transmit` | +| `process.network.io.receive` | Counter | By | Network bytes received. | | +| `process.network.io.transmit` | Counter | By | Network bytes transmitted. | | +| `process.open_file_descriptors` | UpDownCounter | {count} | Number of file descriptors in use by the process. | +| `process.context_switches.voluntary` | Counter | {count} | Number of times the process has been voluntarily context switched. | +| `process.context_switches.involuntary` | Counter | {count} | Number of times the process has been involuntarily context switched. | ## Attributes