From 41142c1eb55510b37af5b98ac558ccb2523af3c6 Mon Sep 17 00:00:00 2001 From: Tigran Najaryan <4194920+tigrannajaryan@users.noreply.github.com> Date: Fri, 2 Sep 2022 10:00:11 -0400 Subject: [PATCH] Revert #2617, #2675, #2688: "add metrics to replace metrics with `direction`" (#2748) Please review this carefully. It is not an automatic reverting, I had to fix merge conflicts manually and may have made mistakes, so a thorough review is needed. Changes: - This reverts https://github.com/open-telemetry/opentelemetry-specification/pull/2617. We are reverting it until we are certain how to resolve issue #2726 - Also reverts the corresponding schema file changes done in https://github.com/open-telemetry/opentelemetry-specification/pull/2688 - Also reverts https://github.com/open-telemetry/opentelemetry-specification/pull/2675 ~Note that this does not revert https://github.com/open-telemetry/opentelemetry-specification/pull/2675 which I believe to still be valid. If you think otherwise please speak.~ [UPDATE: discussed in Spec SIG and decided to revert 2675 too]. Contributes to https://github.com/open-telemetry/opentelemetry-specification/issues/2726 --- schemas/1.13.0 | 86 ------------------- .../semantic_conventions/process-metrics.md | 22 ++--- .../semantic_conventions/system-metrics.md | 83 +++++++----------- 3 files changed, 40 insertions(+), 151 deletions(-) diff --git a/schemas/1.13.0 b/schemas/1.13.0 index c3b84c5..0f0ba0c 100644 --- a/schemas/1.13.0 +++ b/schemas/1.13.0 @@ -2,92 +2,6 @@ file_format: 1.1.0 schema_url: https://opentelemetry.io/schemas/1.13.0 versions: 1.13.0: - metrics: - changes: - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: system.paging.operations - by_attribute: direction - metrics_from_attributes: - system.paging.operations.in: in - system.paging.operations.out: out - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: system.disk.io - by_attribute: direction - metrics_from_attributes: - system.disk.io.read: read - system.disk.io.write: write - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: system.disk.operations - by_attribute: direction - metrics_from_attributes: - system.disk.operations.read: read - system.disk.operations.write: write - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: system.disk.operation_time - by_attribute: direction - metrics_from_attributes: - system.disk.operation_time.read: read - system.disk.operation_time.write: write - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: system.disk.merged - by_attribute: direction - metrics_from_attributes: - system.disk.merged.read: read - system.disk.merged.write: write - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: system.network.dropped - by_attribute: direction - metrics_from_attributes: - system.network.dropped.receive: receive - system.network.dropped.transmit: transmit - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: system.network.packets - by_attribute: direction - metrics_from_attributes: - system.network.packets.receive: receive - system.network.packets.transmit: transmit - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: system.network.errors - by_attribute: direction - metrics_from_attributes: - system.network.errors.receive: receive - system.network.errors.transmit: transmit - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: system.network.io - by_attribute: direction - metrics_from_attributes: - system.network.io.receive: receive - system.network.io.transmit: transmit - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: process.disk.io - by_attribute: direction - metrics_from_attributes: - process.disk.io.read: read - process.disk.io.write: write - # https://github.com/open-telemetry/opentelemetry-specification/pull/2617 - - split: - apply_to_metric: process.network.io - by_attribute: direction - metrics_from_attributes: - process.network.io.receive: receive - process.network.io.transmit: transmit - # https://github.com/open-telemetry/opentelemetry-specification/pull/2675 - - split: - apply_to_metric: system.network.connections - by_attribute: protocol - metrics_from_attributes: - system.network.tcp.connections: tcp - system.network.udp.connections: udp spans: changes: # https://github.com/open-telemetry/opentelemetry-specification/pull/2614 diff --git a/specification/metrics/semantic_conventions/process-metrics.md b/specification/metrics/semantic_conventions/process-metrics.md index 0f95104..62a5bf0 100644 --- a/specification/metrics/semantic_conventions/process-metrics.md +++ b/specification/metrics/semantic_conventions/process-metrics.md @@ -31,19 +31,15 @@ metrics](runtime-environment-metrics.md). Below is a table of Process metric instruments. -| Name | Instrument Type ([*](README.md#instrument-types)) | 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.threads` | UpDownCounter | {threads} | Process threads count. | | +| Name | Instrument Type ([*](README.md#instrument-types)) | 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` | 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. | | ## Attributes diff --git a/specification/metrics/semantic_conventions/system-metrics.md b/specification/metrics/semantic_conventions/system-metrics.md index 4804f82..e78459b 100644 --- a/specification/metrics/semantic_conventions/system-metrics.md +++ b/specification/metrics/semantic_conventions/system-metrics.md @@ -54,39 +54,29 @@ memory](#systempaging---pagingswap-metrics). **Description:** System level paging/swap memory metrics. -| Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | -| ------------------------------------- | ----------------------------------- | ------------ | ------------------------------------------------- | ---------- | ------------- | ---------------- | -| system.paging.usage | Unix swap or windows pagefile usage | By | UpDownCounter | Int64 | state | used, free | -| system.paging.utilization | | 1 | Gauge | Double | state | used, free | -| system.paging.faults | | {faults} | Counter | Int64 | type | major, minor | -| system.paging.operations (deprecated) | | {operations} | Counter | Int64 | type | major, minor | -| | | | | | direction | in, out | -| system.paging.operations.in | | {operations} | Counter | Int64 | type | major, minor | -| system.paging.operations.out | | {operations} | Counter | Int64 | type | major, minor | +| Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | +|---------------------------|-------------------------------------|--------------|---------------------------------------------------|------------|---------------|------------------| +| system.paging.usage | Unix swap or windows pagefile usage | By | UpDownCounter | Int64 | state | used, free | +| system.paging.utilization | | 1 | Gauge | Double | state | used, free | +| system.paging.faults | | {faults} | Counter | Int64 | type | major, minor | +| system.paging.operations | | {operations} | Counter | Int64 | type | major, minor | +| | | | | | direction | in, out | ### `system.disk.` - Disk controller metrics **Description:** System level disk performance metrics. -| Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | -| ------------------------------------------------ | ----------------------------------------------- | ------------ | ------------------------------------------------- | ---------- | ------------- | ---------------- | -| system.disk.io (deprecated) | | By | Counter | Int64 | device | (identifier) | -| | | | | | direction | read, write | -| system.disk.io.read | | By | Counter | Int64 | device | (identifier) | -| system.disk.io.write | | By | Counter | Int64 | device | (identifier) | -| system.disk.operations (deprecated) | | {operations} | Counter | Int64 | device | (identifier) | -| | | | | | direction | read, write | -| system.disk.operations.read | | {operations} | Counter | Int64 | device | (identifier) | -| system.disk.operations.write | | {operations} | Counter | Int64 | device | (identifier) | -| system.disk.io_time\[1\] | Time disk spent activated | s | Counter | Double | device | (identifier) | -| system.disk.operation_time (deprecated) | Sum of the time each operation took to complete | s | Counter | Double | device | (identifier) | -| | | | | | direction | read, write | -| system.disk.operation_time.read\[2\] | Sum of the time each operation took to complete | s | Counter | Double | device | (identifier) | -| system.disk.operation_time.write\[2\] | Sum of the time each operation took to complete | s | Counter | Double | device | (identifier) | -| system.disk.merged (deprecated) | | {operations} | Counter | Int64 | device | (identifier) | -| | | | | | direction | read, write | -| system.disk.merged.read | | {operations} | Counter | Int64 | device | (identifier) | -| system.disk.merged.write | | {operations} | Counter | Int64 | device | (identifier) | +| Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | +|--------------------------------------------|-------------------------------------------------|--------------|---------------------------------------------------|------------|---------------|------------------| +| system.disk.io | | By | Counter | Int64 | device | (identifier) | +| | | | | | direction | read, write | +| system.disk.operations | | {operations} | Counter | Int64 | device | (identifier) | +| | | | | | direction | read, write | +| system.disk.io_time\[1\] | Time disk spent activated | s | Counter | Double | device | (identifier) | +| system.disk.operation_time\[2\] | Sum of the time each operation took to complete | s | Counter | Double | device | (identifier) | +| | | | | | direction | read, write | +| system.disk.merged | | {operations} | Counter | Int64 | device | (identifier) | +| | | | | | direction | read, write | 1 The real elapsed time ("wall clock") used in the I/O path (time from operations running in parallel are not @@ -128,30 +118,19 @@ perf counter (similar for Writes) **Description:** System level network metrics. -| Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | -| ----------------------------------------------- | ----------------------------------------------------------------------------------------- | ------------- | ------------------------------------------------- | ---------- | ------------- | ---------------------------------------------------------------------------------------------- | -| system.network.dropped (deprecated) | Count of packets that are dropped or discarded even though there was no error | {packets} | Counter | Int64 | device | (identifier) | -| | | | | | direction | transmit, receive | -| system.network.dropped.transmit\[1\] | Count of packets that are dropped or discarded on transmit even though there was no error | {packets} | Counter | Int64 | device | (identifier) | -| system.network.dropped.receive\[1\] | Count of packets that are dropped or discarded on receive even though there was no error | {packets} | Counter | Int64 | device | (identifier) | -| system.network.packets (deprecated) | | {packets} | Counter | Int64 | device | (identifier) | -| | | | | | direction | transmit, receive | -| system.network.packets.transmit | Count of packets transmitted | {packets} | Counter | Int64 | device | (identifier) | -| system.network.packets.receive | Count of packets received | {packets} | Counter | Int64 | device | (identifier) | -| system.network.errors (deprecated) | Count of network errors detected | {errors} | Counter | Int64 | device | (identifier) | -| | | | | | direction | transmit, receive | -| system.network.errors.transmit\[2\] | Count of network errors detected on transmit | {errors} | Counter | Int64 | device | (identifier) | -| system.network.errors.receive\[2\] | Count of network errors detected on receive | {errors} | Counter | Int64 | device | (identifier) | -| system.network.io (deprecated) | | By | Counter | Int64 | device | (identifier) | -| | | | | | direction | transmit, receive | -| system.network.io.transmit | Bytes sent | By | Counter | Int64 | device | (identifier) | -| system.network.io.receive | Bytes received | By | Counter | Int64 | device | (identifier) | -| system.network.connections (deprecated) | | {connections} | UpDownCounter | Int64 | device | (identifier) | -| | | | | | protocol | tcp, udp, [etc.](https://en.wikipedia.org/wiki/Transport_layer#Protocols) | -| | | | | | state | If specified, SHOULD be one of: close, close_wait, closing, delete, established, fin_wait_1, fin_wait_2, last_ack, listen, syn_recv, syn_sent, time_wait. A stateless protocol MUST NOT set this attribute. | -| system.network.tcp.connections | Count of TCP connections | {connections} | UpDownCounter | Int64 | device | (identifier) | -| | | | | | state | SHOULD be one of: close, close_wait, closing, delete, established, fin_wait_1, fin_wait_2, last_ack, listen, syn_recv, syn_sent, time_wait. A stateless protocol MUST NOT set this attribute. | -| system.network.udp.connections | Count of UDP connections | {connections} | UpDownCounter | Int64 | device | (identifier) | +| Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | +|----------------------------------------|-------------------------------------------------------------------------------|---------------|---------------------------------------------------|------------|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| system.network.dropped\[1\] | Count of packets that are dropped or discarded even though there was no error | {packets} | Counter | Int64 | device | (identifier) | +| | | | | | direction | transmit, receive | +| system.network.packets | | {packets} | Counter | Int64 | device | (identifier) | +| | | | | | direction | transmit, receive | +| system.network.errors\[2\] | Count of network errors detected | {errors} | Counter | Int64 | device | (identifier) | +| | | | | | direction | transmit, receive | +| system.network.io | | By | Counter | Int64 | device | (identifier) | +| | | | | | direction | transmit, receive | +| system.network.connections | | {connections} | UpDownCounter | Int64 | device | (identifier) | +| | | | | | protocol | tcp, udp, [etc.](https://en.wikipedia.org/wiki/Transport_layer#Protocols) | +| | | | | | state | If specified, SHOULD be one of: close, close_wait, closing, delete, established, fin_wait_1, fin_wait_2, last_ack, listen, syn_recv, syn_sent, time_wait. A stateless protocol MUST NOT set this attribute. | 1 Measured as: