From 226038816532995768124ea924460fc270818e6a Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Tue, 5 Oct 2021 08:51:33 -0700 Subject: [PATCH] Update metrics semantic conventions to use the new instrument names (#1976) Signed-off-by: Bogdan Drutu Co-authored-by: Carlos Alberto Cortez --- .../semantic_conventions/http-metrics.md | 14 +-- .../metrics/semantic_conventions/rpc.md | 28 ++--- .../semantic_conventions/system-metrics.md | 110 +++++++++--------- 3 files changed, 76 insertions(+), 76 deletions(-) diff --git a/specification/metrics/semantic_conventions/http-metrics.md b/specification/metrics/semantic_conventions/http-metrics.md index 38d05416a93..a24e2bbb5cd 100644 --- a/specification/metrics/semantic_conventions/http-metrics.md +++ b/specification/metrics/semantic_conventions/http-metrics.md @@ -17,18 +17,18 @@ type and units. Below is a table of HTTP server metric instruments. -| Name | Instrument | Units | Description | -|-------------------------------|-------------------|--------------|-------------| -| `http.server.duration` | ValueRecorder | milliseconds | measures the duration of the inbound HTTP request | -| `http.server.active_requests` | UpDownSumObserver | requests | measures the number of concurrent HTTP requests that are currently in-flight | +| Name | Instrument | Units | Description | +|-------------------------------|----------------------------|--------------|-------------| +| `http.server.duration` | Histogram | milliseconds | measures the duration of the inbound HTTP request | +| `http.server.active_requests` | Asynchronous UpDownCounter | requests | measures the number of concurrent HTTP requests that are currently in-flight | ### HTTP Client Below is a table of HTTP client metric instruments. -| Name | Instrument | Units | Description | -|------------------------|---------------|--------------|-------------| -| `http.client.duration` | ValueRecorder | milliseconds | measure the duration of the outbound HTTP request | +| Name | Instrument | Units | Description | +|------------------------|------------|--------------|-------------| +| `http.client.duration` | Histogram | milliseconds | measure the duration of the outbound HTTP request | ## Attributes diff --git a/specification/metrics/semantic_conventions/rpc.md b/specification/metrics/semantic_conventions/rpc.md index 61cd34fc501..12463cbef3f 100644 --- a/specification/metrics/semantic_conventions/rpc.md +++ b/specification/metrics/semantic_conventions/rpc.md @@ -31,26 +31,26 @@ MUST be of the specified type and units. Below is a table of RPC server metric instruments. -| Name | Instrument | Units | Description | Status | Streaming | -|----------------------------|---------------|--------------|-------------|--------|-----------| -| `rpc.server.duration` | ValueRecorder | milliseconds | measures duration of inbound RPC | Recommended | N/A. While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice. | -| `rpc.server.request.size` | ValueRecorder | bytes | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch | -| `rpc.server.response.size` | ValueRecorder | bytes | measures size of RPC response messages (uncompressed) | Optional | Recorded per response in a streaming batch | -| `rpc.server.requests_per_rpc` | ValueRecorder | count | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required | -| `rpc.server.responses_per_rpc` | ValueRecorder | count | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required | +| Name | Instrument | Units | Description | Status | Streaming | +|------|------------|-------|-------------|--------|-----------| +| `rpc.server.duration` | Histogram | milliseconds | measures duration of inbound RPC | Recommended | N/A. While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice. | +| `rpc.server.request.size` | Histogram | bytes | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch | +| `rpc.server.response.size` | Histogram | bytes | measures size of RPC response messages (uncompressed) | Optional | Recorded per response in a streaming batch | +| `rpc.server.requests_per_rpc` | Histogram | count | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required | +| `rpc.server.responses_per_rpc` | Histogram | count | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required | ### RPC Client Below is a table of RPC client metric instruments. These apply to traditional RPC usage, not streaming RPCs. -| Name | Instrument | Units | Description | Status | Streaming | -|----------------------------|---------------|--------------|-------------|--------|-----------| -| `rpc.client.duration` | ValueRecorder | milliseconds | measures duration of outbound RPC | Recommended | N/A. While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice. | -| `rpc.client.request.size` | ValueRecorder | bytes | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch | -| `rpc.client.response.size` | ValueRecorder | bytes | measures size of RPC response messages (uncompressed) | Optional | Recorded per message in a streaming batch | -| `rpc.client.requests_per_rpc` | ValueRecorder | count | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required | -| `rpc.client.responses_per_rpc` | ValueRecorder | count | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required | +| Name | Instrument | Units | Description | Status | Streaming | +|------|------------|-------|-------------|--------|-----------| +| `rpc.client.duration` | Histogram | milliseconds | measures duration of outbound RPC | Recommended | N/A. While streaming RPCs may record this metric as start-of-batch to end-of-batch, it's hard to interpret in practice. | +| `rpc.client.request.size` | Histogram | bytes | measures size of RPC request messages (uncompressed) | Optional | Recorded per message in a streaming batch | +| `rpc.client.response.size` | Histogram | bytes | measures size of RPC response messages (uncompressed) | Optional | Recorded per message in a streaming batch | +| `rpc.client.requests_per_rpc` | Histogram | count | measures the number of messages received per RPC. Should be 1 for all non-streaming RPCs | Optional | Required | +| `rpc.client.responses_per_rpc` | Histogram | count | measures the number of messages sent per RPC. Should be 1 for all non-streaming RPCs | Optional | Required | ## Attributes diff --git a/specification/metrics/semantic_conventions/system-metrics.md b/specification/metrics/semantic_conventions/system-metrics.md index 02b69ad24e2..11b97442e6d 100644 --- a/specification/metrics/semantic_conventions/system-metrics.md +++ b/specification/metrics/semantic_conventions/system-metrics.md @@ -29,12 +29,12 @@ instruments not explicitly defined in the specification. **Description:** System level processor metrics. -| Name | Description | Units | Instrument Type | Value Type | Attribute Key(s) | Attribute Values | -| ---------------------- | ----------- | ----- | --------------- | ---------- | ---------------- | ----------------------------------- | -| system.cpu.time | | s | SumObserver | Double | state | idle, user, system, interrupt, etc. | -| | | | | | cpu | CPU number [0..n-1] | -| system.cpu.utilization | | 1 | ValueObserver | Double | state | idle, user, system, interrupt, etc. | -| | | | | | cpu | CPU number (0..n) | +| Name | Description | Units | Instrument Type | Value Type | Attribute Key(s) | Attribute Values | +| ---------------------- | ----------- | ----- | ---------------------| ---------- | ---------------- | ----------------------------------- | +| system.cpu.time | | s | Asynchronous Counter | Double | state | idle, user, system, interrupt, etc. | +| | | | | | cpu | CPU number [0..n-1] | +| system.cpu.utilization | | 1 | Asynchronous Gauge | Double | state | idle, user, system, interrupt, etc. | +| | | | | | cpu | CPU number (0..n) | ### `system.memory.` - Memory metrics @@ -43,34 +43,34 @@ memory](#systempaging---pagingswap-metrics). | Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | | ------------------------- | ----------- | ----- | ----------------- | ---------- | ------------- | ------------------------ | -| system.memory.usage | | By | UpDownSumObserver | Int64 | state | used, free, cached, etc. | -| system.memory.utilization | | 1 | ValueObserver | Double | state | used, free, cached, etc. | +| system.memory.usage | | By | Asynchronous UpDownCounter | Int64 | state | used, free, cached, etc. | +| system.memory.utilization | | 1 | Asynchronous Gauge | Double | state | used, free, cached, etc. | ### `system.paging.` - Paging/swap metrics **Description:** System level paging/swap memory metrics. -| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | -| ------------------------- | ----------------------------------- | ------------ | ----------------- | ---------- | ------------- | ---------------- | -| system.paging.usage | Unix swap or windows pagefile usage | By | UpDownSumObserver | Int64 | state | used, free | -| system.paging.utilization | | 1 | ValueObserver | Double | state | used, free | -| system.paging.faults | | {faults} | SumObserver | Int64 | type | major, minor | -| system.paging.operations | | {operations} | SumObserver | Int64 | type | major, minor | -| | | | | | direction | in, out | +| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | +| ------------------------- | ----------------------------------- | ------------ | -------------------------- | ---------- | ------------- | ---------------- | +| system.paging.usage | Unix swap or windows pagefile usage | By | Asynchronous UpDownCounter | Int64 | state | used, free | +| system.paging.utilization | | 1 | Asynchronous Gauge | Double | state | used, free | +| system.paging.faults | | {faults} | Asynchronous Counter | Int64 | type | major, minor | +| system.paging.operations | | {operations} | Asynchronous Counter | Int64 | type | major, minor | +| | | | | | direction | in, out | ### `system.disk.` - Disk controller metrics **Description:** System level disk performance metrics. -| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | -| --------------------------------------------------------- | ----------------------------------------------- | ------------ | --------------- | ---------- | ------------- | ---------------- | -| system.disk.io | | By | SumObserver | Int64 | device | (identifier) | -| | | | | | direction | read, write | -| system.disk.operations | | {operations} | SumObserver | Int64 | device | (identifier) | -| | | | | | direction | read, write | -| system.disk.io_time[1](#io_time) | Time disk spent activated | s | SumObserver | Double | device | (identifier) | -| system.disk.operation_time[2](#operation_time) | Sum of the time each operation took to complete | s | SumObserver | Double | device | (identifier) | -| | | | | | direction | read, write | -| system.disk.merged | | {operations} | SumObserver | Int64 | device | (identifier) | -| | | | | | direction | read, write | +| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | +| --------------------------------------------------------- | ----------------------------------------------- | ------------ | ------------------------ | ---------- | ------------- | ---------------- | +| system.disk.io | | By | Asynchronous Counter | Int64 | device | (identifier) | +| | | | | | direction | read, write | +| system.disk.operations | | {operations} | Asynchronous Counter | Int64 | device | (identifier) | +| | | | | | direction | read, write | +| system.disk.io_time[1](#io_time) | Time disk spent activated | s | Asynchronous Counter | Double | device | (identifier) | +| system.disk.operation_time[2](#operation_time) | Sum of the time each operation took to complete | s | Asynchronous Counter | Double | device | (identifier) | +| | | | | | direction | read, write | +| system.disk.merged | | {operations} | Asynchronous 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 @@ -94,35 +94,35 @@ perf counter (similar for Writes) ### `system.filesystem.` - Filesystem metrics **Description:** System level filesystem metrics. -| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | -| ----------------------------- | ----------- | ----- | ----------------- | ---------- | -------------- | -------------------- | -| system.filesystem.usage | | By | UpDownSumObserver | Int64 | device | (identifier) | -| | | | | | state | used, free, reserved | -| | | | | | type | ext4, tmpfs, etc. | -| | | | | | mode | rw, ro, etc. | -| | | | | | mountpoint | (path) | -| system.filesystem.utilization | | 1 | ValueObserver | Double | device | (identifier) | -| | | | | | state | used, free, reserved | -| | | | | | type | ext4, tmpfs, etc. | -| | | | | | mode | rw, ro, etc. | -| | | | | | mountpoint | (path) | +| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | +| ----------------------------- | ----------- | ----- | -------------------------- | ---------- | -------------- | -------------------- | +| system.filesystem.usage | | By | Asynchronous UpDownCounter | Int64 | device | (identifier) | +| | | | | | state | used, free, reserved | +| | | | | | type | ext4, tmpfs, etc. | +| | | | | | mode | rw, ro, etc. | +| | | | | | mountpoint | (path) | +| system.filesystem.utilization | | 1 | Asynchronous Gauge | Double | device | (identifier) | +| | | | | | state | used, free, reserved | +| | | | | | type | ext4, tmpfs, etc. | +| | | | | | mode | rw, ro, etc. | +| | | | | | mountpoint | (path) | ### `system.network.` - Network metrics **Description:** System level network metrics. -| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | -| ---------------------------------------------- | ----------------------------------------------------------------------------- | ------------- | ----------------- | ---------- | ------------- | ---------------------------------------------------------------------------------------------- | -| system.network.dropped[1](#dropped) | Count of packets that are dropped or discarded even though there was no error | {packets} | SumObserver | Int64 | device | (identifier) | -| | | | | | direction | transmit, receive | -| system.network.packets | | {packets} | SumObserver | Int64 | device | (identifier) | -| | | | | | direction | transmit, receive | -| system.network.errors[2](#errors) | Count of network errors detected | {errors} | SumObserver | Int64 | device | (identifier) | -| | | | | | direction | transmit, receive | -| system.network.io | | By | SumObserver | Int64 | device | (identifier) | -| | | | | | direction | transmit, receive | -| system.network.connections | | {connections} | UpDownSumObserver | 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 | Value Type | Attribute Key | Attribute Values | +| ---------------------------------------------- | ----------------------------------------------------------------------------- | ------------- | -------------------------- | ---------- | ------------- | ---------------------------------------------------------------------------------------------- | +| system.network.dropped[1](#dropped) | Count of packets that are dropped or discarded even though there was no error | {packets} | Asynchronous Counter | Int64 | device | (identifier) | +| | | | | | direction | transmit, receive | +| system.network.packets | | {packets} | Asynchronous Counter | Int64 | device | (identifier) | +| | | | | | direction | transmit, receive | +| system.network.errors[2](#errors) | Count of network errors detected | {errors} | Asynchronous Counter | Int64 | device | (identifier) | +| | | | | | direction | transmit, receive | +| system.network.io | | By | Asynchronous Counter | Int64 | device | (identifier) | +| | | | | | direction | transmit, receive | +| system.network.connections | | {connections} | Asynchronous 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: @@ -146,10 +146,10 @@ from **Description:** System level aggregate process metrics. For metrics at the individual process level, see [process metrics](process-metrics.md). -| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | -| ------------------------ | --------------------------------------------------------- | ----------- | ----------------- | ---------- | ------------- | ---------------------------------------------------------------------------------------------- | -| system.processes.count | Total number of processes in each state | {processes} | UpDownSumObserver | 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} | SumObserver | Int64 | - | - | +| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values | +| ------------------------ | --------------------------------------------------------- | ----------- | -------------------------- | ---------- | ------------- | ---------------------------------------------------------------------------------------------- | +| system.processes.count | Total number of processes in each state | {processes} | Asynchronous 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} | Asynchronous Counter | Int64 | - | - | ### `system.{os}.` - OS Specific System Metrics