diff --git a/CHANGELOG.md b/CHANGELOG.md index cd7386f4691..4a602e64fee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,6 +38,9 @@ release. ([#2618](https://github.com/open-telemetry/opentelemetry-specification/pull/2618)) - Change `faas.document.time` and `faas.time` level from `required` to `recommended` ([#2627](https://github.com/open-telemetry/opentelemetry-specification/pull/2627)) +- Remove `direction` dimension, instead creating metrics with names reflecting those + dimensions. + ([#2617](https://github.com/open-telemetry/opentelemetry-specification/pull/2617)) ### Compatibility diff --git a/specification/metrics/semantic_conventions/process-metrics.md b/specification/metrics/semantic_conventions/process-metrics.md index d6e25c73009..f7f5fbfbb09 100644 --- a/specification/metrics/semantic_conventions/process-metrics.md +++ b/specification/metrics/semantic_conventions/process-metrics.md @@ -31,14 +31,18 @@ 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` | 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` | +| 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. | | ## Attributes diff --git a/specification/metrics/semantic_conventions/system-metrics.md b/specification/metrics/semantic_conventions/system-metrics.md index b4ad4d19ec9..40e3371e8b7 100644 --- a/specification/metrics/semantic_conventions/system-metrics.md +++ b/specification/metrics/semantic_conventions/system-metrics.md @@ -34,7 +34,7 @@ instruments not explicitly defined in the specification. **Description:** System level processor metrics. | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key(s) | Attribute Values | -|------------------------|----------------------------------------------------------------------------------------------------------|-------|---------------------------------------------------|------------|------------------|-------------------------------------| +| ---------------------- | -------------------------------------------------------------------------------------------------------- | ----- | ------------------------------------------------- | ---------- | ---------------- | ----------------------------------- | | system.cpu.time | | s | Counter | Double | state | idle, user, system, interrupt, etc. | | | | | | | cpu | CPU number [0..n-1] | | system.cpu.utilization | Difference in system.cpu.time since the last measurement, divided by the elapsed time and number of CPUs | 1 | Gauge | Double | state | idle, user, system, interrupt, etc. | @@ -46,7 +46,7 @@ instruments not explicitly defined in the specification. memory](#systempaging---pagingswap-metrics). | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | -|---------------------------|-------------|-------|---------------------------------------------------|------------|---------------|--------------------------| +| ------------------------- | ----------- | ----- | ------------------------------------------------- | ---------- | ------------- | ------------------------ | | system.memory.usage | | By | UpDownCounter | Int64 | state | used, free, cached, etc. | | system.memory.utilization | | 1 | Gauge | Double | state | used, free, cached, etc. | @@ -54,29 +54,39 @@ 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 | | {operations} | Counter | Int64 | type | major, minor | -| | | | | | direction | in, out | +| 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 | ### `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 | | 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 | +| 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) | 1 The real elapsed time ("wall clock") used in the I/O path (time from operations running in parallel are not @@ -102,7 +112,7 @@ perf counter (similar for Writes) **Description:** System level filesystem metrics. | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | -|-------------------------------|-------------|-------|---------------------------------------------------|------------|---------------|----------------------| +| ----------------------------- | ----------- | ----- | ------------------------------------------------- | ---------- | ------------- | -------------------- | | system.filesystem.usage | | By | UpDownCounter | Int64 | device | (identifier) | | | | | | | state | used, free, reserved | | | | | | | type | ext4, tmpfs, etc. | @@ -118,19 +128,27 @@ 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\[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 | [e.g. for tcp](https://en.wikipedia.org/wiki/Transmission_Control_Protocol#Protocol_operation) | +| 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 | | {connections} | UpDownCounter | Int64 | device | (identifier) | +| | | | | | protocol | tcp, udp, [etc.](https://en.wikipedia.org/wiki/Transport_layer#Protocols) | +| | | | | | state | [e.g. for tcp](https://en.wikipedia.org/wiki/Transmission_Control_Protocol#Protocol_operation) | 1 Measured as: @@ -156,7 +174,7 @@ from individual process level, see [process metrics](process-metrics.md). | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | -|--------------------------|-----------------------------------------------------------|-------------|---------------------------------------------------|------------|---------------|------------------------------------------------------------------------------------------------| +| ------------------------ | --------------------------------------------------------- | ----------- | ------------------------------------------------- | ---------- | ------------- | ---------------------------------------------------------------------------------------------- | | system.processes.count | Total number of processes in each state | {processes} | UpDownCounter | Int64 | status | running, sleeping, [etc.](https://man7.org/linux/man-pages/man1/ps.1.html#PROCESS_STATE_CODES) | | system.processes.created | Total number of processes created over uptime of the host | {processes} | Counter | Int64 | - | - |