diff --git a/model/metrics/process-metrics.yaml b/model/metrics/process-metrics.yaml index 7ccc0f3549..3b141fd994 100644 --- a/model/metrics/process-metrics.yaml +++ b/model/metrics/process-metrics.yaml @@ -58,15 +58,7 @@ groups: instrument: counter unit: "By" attributes: - - id: process.disk.io_direction - brief: "The direction of the data transfer for this data point." - type: - allow_custom_values: true - members: - - id: read - value: 'read' - - id: write - value: 'write' + - ref: disk.io.direction - id: metric.process.network.io type: metric @@ -75,15 +67,7 @@ groups: instrument: counter unit: "By" attributes: - - id: process.network.io_direction - brief: "The direction of the data transfer for this data point." - type: - allow_custom_values: true - members: - - id: receive - value: 'receive' - - id: transmit - value: 'transmit' + - ref: network.io.direction - id: metric.process.thread.count type: metric @@ -95,7 +79,7 @@ groups: - id: metric.process.open_file_descriptor.count type: metric - metric_name: process.open_file_descriptors + metric_name: process.open_file_descriptor.count brief: "Number of file descriptors in use by the process." instrument: updowncounter unit: "{count}" @@ -108,7 +92,7 @@ groups: instrument: counter unit: "{count}" attributes: - - id: process.context_switch_type + - id: process.context_switches.type brief: "Specifies whether the context switches for this data point were voluntary or involuntary." type: allow_custom_values: true @@ -125,7 +109,7 @@ groups: instrument: counter unit: "{fault}" attributes: - - id: process.paging.fault_type + - id: process.paging.faults.type brief: "The type of page fault for this data point. Type `major` is for major/hard page faults, and `minor` is for minor/soft page faults." type: allow_custom_values: true diff --git a/proposed_changelog.md b/proposed_changelog.md new file mode 100644 index 0000000000..0ae18248e3 --- /dev/null +++ b/proposed_changelog.md @@ -0,0 +1,16 @@ +- BREAKING: Generate process metrics from YAML + ([#330](https://github.com/open-telemetry/semantic-conventions/pull/330)) + - Rename attributes for `process.cpu.*` + - `state` to `process.cpu.state` + - Change attributes for `process.disk.io` + - Instead of `direction` use the global `disk.io.direction` + - Change attributes for `process.network.io` + - Instead of `direction` use `network.io.direction` + - Rename `process.threads` to `process.thread.count` + - Rename `process.open_file_descriptors` to `process.open_file_descriptor.count` + - Rename `process.context_switches` to `process.context_switch.count` + - Rename attributes for `process.context_switch.count` + - `type` to `process.context_switch.type` + - Rename `process.paging.faults` to `process.paging.fault.count` + - Rename attributes for `process.paging.faults` + - `type` to `process.paging.fault.type` diff --git a/proposed_schema_next.yaml b/proposed_schema_next.yaml new file mode 100644 index 0000000000..750d705510 --- /dev/null +++ b/proposed_schema_next.yaml @@ -0,0 +1,33 @@ +metrics: +# https://github.com/open-telemetry/semantic-conventions/pull/330 +- rename_metrics: + process.threads: process.thread.count + process.open_file_descriptors: process.open_file_descriptor.count + process.context_switches: process.context_switch.count + process.paging.faults: process.paging.fault.count +- rename_attributes: + attribute_map: + state: process.cpu.state + apply_to_metrics: + - process.cpu.time + - process.cpu.utilization +- rename_attributes: + attribute_map: + direction: disk.io.direction + apply_to_metrics: + - process.disk.io +- rename_attributes: + attribute_map: + type: process.context_switch.type + apply_to_metrics: + - process.context_switch.count +- rename_attributes: + attribute_map: + direction: network.io.direction + apply_to_metrics: + - process.network.io +- rename_attributes: + attribute_map: + type: process.paging.fault.type + apply_to_metrics: + - process.paging.fault.count \ No newline at end of file