Update metrics semantic conventions to use the new instrument names (#1976)

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Co-authored-by: Carlos Alberto Cortez <calberto.cortez@gmail.com>
This commit is contained in:
Bogdan Drutu 2021-10-05 08:51:33 -07:00 committed by GitHub
parent 830a4223c6
commit cdf0cd8679
3 changed files with 76 additions and 76 deletions

View File

@ -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

View File

@ -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

View File

@ -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<!--notlink--> | | By | SumObserver | Int64 | device | (identifier) |
| | | | | | direction | read, write |
| system.disk.operations | | {operations} | SumObserver | Int64 | device | (identifier) |
| | | | | | direction | read, write |
| system.disk.io_time<sup>[1](#io_time)</sup> | Time disk spent activated | s | SumObserver | Double | device | (identifier) |
| system.disk.operation_time<sup>[2](#operation_time)</sup> | 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<!--notlink--> | | 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<sup>[1](#io_time)</sup> | Time disk spent activated | s | Asynchronous Counter | Double | device | (identifier) |
| system.disk.operation_time<sup>[2](#operation_time)</sup> | 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 |
<sup><a name="io_time">1</a></sup> 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<sup>[1](#dropped)</sup> | 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<sup>[2](#errors)</sup> | Count of network errors detected | {errors} | SumObserver | Int64 | device | (identifier) |
| | | | | | direction | transmit, receive |
| system<!--notlink-->.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<sup>[1](#dropped)</sup> | 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<sup>[2](#errors)</sup> | Count of network errors detected | {errors} | Asynchronous Counter | Int64 | device | (identifier) |
| | | | | | direction | transmit, receive |
| system<!--notlink-->.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) |
<sup><a name="dropped">1</a></sup> 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