diff --git a/CHANGELOG.md b/CHANGELOG.md index b02c7e9ab86..bf31d2c6b21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -58,6 +58,13 @@ release. - Add transition plan for upcoming breaking changes to the unstable HTTP semantic conventions. ([#3443](https://github.com/open-telemetry/opentelemetry-specification/pull/3443)) +- Rename `process.cpu.time` metric attribute `state` to `cpu.state`, + rename `process.cpu.utilization` metric attribute `state` to `cpu.state`, + rename `process.disk.io` metric attribute `direction` to `disk.direction`, + rename `process.network.io` metric attribute `direction` to `network.direction`, + rename `process.context_switches` metric attribute `type` to `context_switch.type`, + rename `process.paging.faults` metric attribute `type` to `memory.page_fault.type`, + ([#3431](https://github.com/open-telemetry/opentelemetry-specification/pull/3431)) ### Compatibility diff --git a/schemas/1.21.0 b/schemas/1.21.0 index ab76d6e1a8d..38baf8c96fc 100644 --- a/schemas/1.21.0 +++ b/schemas/1.21.0 @@ -9,6 +9,35 @@ versions: attribute_map: messaging.kafka.client_id: messaging.client_id messaging.rocketmq.client_id: messaging.client_id + metrics: + changes: + # https://github.com/open-telemetry/opentelemetry-specification/pull/3431 + - rename_attributes: + attribute_map: + state: cpu.state + apply_to_metrics: + - process.cpu.time + - process.cpu.utilization + - rename_attributes: + attribute_map: + direction: disk.direction + apply_to_metrics: + - process.disk.io + - rename_attributes: + attribute_map: + direction: network.direction + apply_to_metrics: + - process.network.io + - rename_attributes: + attribute_map: + type: context_switch.type + apply_to_metrics: + - process.context_switches + - rename_attributes: + attribute_map: + type: memory.page_fault.type + apply_to_metrics: + - process.paging.faults 1.20.0: spans: changes: diff --git a/specification/metrics/semantic_conventions/process-metrics.md b/specification/metrics/semantic_conventions/process-metrics.md index 529fdca299a..c12bb3bd3a9 100644 --- a/specification/metrics/semantic_conventions/process-metrics.md +++ b/specification/metrics/semantic_conventions/process-metrics.md @@ -31,18 +31,18 @@ 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 | 1 | 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 | {thread} | 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` | -| `process.paging.faults` | Counter | {fault} | Number of page faults the process has made. | `type`, if specified, SHOULD be one of: `major` (for major, or hard, page faults), `minor` (for minor, or soft, page faults). | +| Name | Instrument Type ([\*](README.md#instrument-types)) | Unit | Description | Labels | +|---------------------------------|----------------------------------------------------|-----------|-------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `process.cpu.time` | Counter | s | Total CPU seconds broken down by different states. | `cpu.state`, if specified, SHOULD be one of: `system`, `user`, `wait`. A process SHOULD be characterized _either_ by data points with no `cpu.state` labels, _or only_ data points with `cpu.state` labels. | +| `process.cpu.utilization` | Gauge | 1 | Difference in process.cpu.time since the last measurement, divided by the elapsed time and number of CPUs available to the process. | `cpu.state`, if specified, SHOULD be one of: `system`, `user`, `wait`. A process SHOULD be characterized _either_ by data points with no `cpu.state` labels, _or only_ data points with `cpu.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. | `disk.direction` SHOULD be one of: `read`, `write` | +| `process.network.io` | Counter | By | Network bytes transferred. | `network.direction` SHOULD be one of: `receive`, `transmit` | +| `process.threads` | UpDownCounter | {thread} | 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. | `context_switch.type` SHOULD be one of: `involuntary`, `voluntary` | +| `process.paging.faults` | Counter | {fault} | Number of page faults the process has made. | `memory.page_fault.type`, if specified, SHOULD be one of: `major` (for major, or hard, page faults), `minor` (for minor, or soft, page faults). | ## Attributes