Skip to content

Commit

Permalink
Add additional process metrics to the metrics semantic conventions
Browse files Browse the repository at this point in the history
Add the following:
- `process.context_switches`
- `process.open_file_descriptors`
  • Loading branch information
evan-bradley committed Sep 8, 2022
1 parent d1e4720 commit 9a87564
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ release.
([#2538](https://github.com/open-telemetry/opentelemetry-specification/pull/2538)).
- Add `process.threads` host metric semantic convention.
([#2705](https://github.com/open-telemetry/opentelemetry-specification/pull/2705)).
- Add `process.context_switches`, and `process.open_file_descriptors`, to the
metrics semantic conventions
([#2706](https://github.com/open-telemetry/opentelemetry-specification/pull/2706)).

### Logs

Expand Down
20 changes: 11 additions & 9 deletions specification/metrics/semantic_conventions/process-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,17 @@ 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` | Counter | By | Disk bytes transferred. | `direction` SHOULD be one of: `read`, `write` |
| `process.network.io` | Counter | By | Network bytes transferred. | `direction` SHOULD be one of: `receive`, `transmit` |
| `process.threads` | UpDownCounter | {threads} | Process threads count. | |
| 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` | Counter | By | Disk bytes transferred. | `direction` SHOULD be one of: `read`, `write` |
| `process.network.io` | Counter | By | Network bytes transferred. | `direction` SHOULD be one of: `receive`, `transmit` |
| `process.threads` | UpDownCounter | {threads} | Process threads count. | |
| `process.open_file_descriptors` | UpDownCounter | {count} | Number of file descriptors in use by the process. | |
| `process.context_switches` | Counter | {count} | Number of times the process has been context switched. | `type` SHOULD be one of: `involuntary`, `voluntary` |

## Attributes

Expand Down

0 comments on commit 9a87564

Please sign in to comment.