Skip to content

Commit

Permalink
Expand to all metric conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
trask authored and fstab committed Mar 30, 2022
1 parent 3b5f220 commit 4faebf4
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ release.
([#2290](https://github.com/open-telemetry/opentelemetry-specification/pull/2290))
- Add semantic conventions for [CloudEvents](https://cloudevents.io).
([#1978](https://github.com/open-telemetry/opentelemetry-specification/pull/1978))
- Allow JVM metrics to be synchronous
- Allow all metric conventions to be either synchronous or asynchronous.
([#2458](https://github.com/open-telemetry/opentelemetry-specification/pull/2458)
- Add `process.cpu.utilization` metric.
([#2436](https://github.com/open-telemetry/opentelemetry-specification/pull/2436))
Expand Down
2 changes: 1 addition & 1 deletion specification/metrics/semantic_conventions/http-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Below is a table of HTTP server metric instruments.
| Name | Instrument | Unit | Unit ([UCUM](README.md#instrument-units)) | Description |
|-------------------------------|----------------------------|--------------|-------------------------------------------|-------------|
| `http.server.duration` | Histogram | milliseconds | `ms` | measures the duration of the inbound HTTP request |
| `http.server.active_requests` | Asynchronous UpDownCounter | requests | `{requests}` | measures the number of concurrent HTTP requests that are currently in-flight |
| `http.server.active_requests` | UpDownCounter | requests | `{requests}` | measures the number of concurrent HTTP requests that are currently in-flight |

### HTTP Client

Expand Down
10 changes: 5 additions & 5 deletions specification/metrics/semantic_conventions/process-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ Below is a table of Process metric instruments.

| Name | Instrument | Units | Description | Labels |
|------|------------|-------|-------------|--------|
| `process.cpu.time` | Asynchronous 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` | Asynchronous 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` | Asynchronous UpDownCounter | By | The amount of physical memory in use. | |
| `process.memory.virtual` | Asynchronous UpDownCounter | By | The amount of committed virtual memory. | |
| `process.disk.io` | Asynchronous Counter | By | Disk bytes transferred. | `direction` SHOULD be one of: `read`, `write` |
| `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` |

## Attributes

Expand Down
36 changes: 18 additions & 18 deletions specification/metrics/semantic_conventions/system-metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ instruments not explicitly defined in the specification.

| 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. |
| 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 | Asynchronous Gauge | Double | state | idle, user, system, interrupt, etc. |
| | | | | | cpu | CPU number (0..n) |
Expand All @@ -43,33 +43,33 @@ memory](#systempaging---pagingswap-metrics).

| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values |
| ------------------------- | ----------- | ----- | ----------------- | ---------- | ------------- | ------------------------ |
| system.memory.usage | | By | Asynchronous UpDownCounter | Int64 | state | used, free, cached, etc. |
| system.memory.usage | | By | 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 | Asynchronous UpDownCounter | Int64 | state | used, free |
| system.paging.usage | Unix swap or windows pagefile usage | By | 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 |
| 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 | Value Type | Attribute Key | Attribute Values |
| --------------------------------------------------------- | ----------------------------------------------- | ------------ | ------------------------ | ---------- | ------------- | ---------------- |
| system.disk.io<!--notlink--> | | By | Asynchronous Counter | Int64 | device | (identifier) |
| system.disk.io<!--notlink--> | | By | Counter | Int64 | device | (identifier) |
| | | | | | direction | read, write |
| system.disk.operations | | {operations} | Asynchronous Counter | Int64 | device | (identifier) |
| system.disk.operations | | {operations} | Counter | Int64 | device | (identifier) |
| | | | | | direction | read, write |
| system.disk.io_time<sup>\[1\]</sup> | Time disk spent activated | s | Asynchronous Counter | Double | device | (identifier) |
| system.disk.operation_time<sup>\[2\]</sup> | Sum of the time each operation took to complete | s | Asynchronous Counter | Double | device | (identifier) |
| system.disk.io_time<sup>\[1\]</sup> | Time disk spent activated | s | Counter | Double | device | (identifier) |
| system.disk.operation_time<sup>\[2\]</sup> | Sum of the time each operation took to complete | s | Counter | Double | device | (identifier) |
| | | | | | direction | read, write |
| system.disk.merged | | {operations} | Asynchronous Counter | Int64 | device | (identifier) |
| system.disk.merged | | {operations} | Counter | Int64 | device | (identifier) |
| | | | | | direction | read, write |

<sup>1</sup> The real elapsed time ("wall clock")
Expand All @@ -96,7 +96,7 @@ perf counter (similar for Writes)
**Description:** System level filesystem metrics.
| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values |
| ----------------------------- | ----------- | ----- | -------------------------- | ---------- | -------------- | -------------------- |
| system.filesystem.usage | | By | Asynchronous UpDownCounter | Int64 | device | (identifier) |
| system.filesystem.usage | | By | UpDownCounter | Int64 | device | (identifier) |
| | | | | | state | used, free, reserved |
| | | | | | type | ext4, tmpfs, etc. |
| | | | | | mode | rw, ro, etc. |
Expand All @@ -112,15 +112,15 @@ perf counter (similar for Writes)
**Description:** System level network metrics.
| Name | Description | Units | Instrument Type | Value Type | Attribute Key | Attribute Values |
| ---------------------------------------------- | ----------------------------------------------------------------------------- | ------------- | -------------------------- | ---------- | ------------- | ---------------------------------------------------------------------------------------------- |
| system.network.dropped<sup>\[1\]</sup> | Count of packets that are dropped or discarded even though there was no error | {packets} | Asynchronous Counter | Int64 | device | (identifier) |
| system.network.dropped<sup>\[1\]</sup> | 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} | Asynchronous Counter | Int64 | device | (identifier) |
| system.network.packets | | {packets} | Counter | Int64 | device | (identifier) |
| | | | | | direction | transmit, receive |
| system.network.errors<sup>\[2\]</sup> | Count of network errors detected | {errors} | Asynchronous Counter | Int64 | device | (identifier) |
| system.network.errors<sup>\[2\]</sup> | Count of network errors detected | {errors} | Counter | Int64 | device | (identifier) |
| | | | | | direction | transmit, receive |
| system<!--notlink-->.network.io | | By | Asynchronous Counter | Int64 | device | (identifier) |
| system<!--notlink-->.network.io | | By | Counter | Int64 | device | (identifier) |
| | | | | | direction | transmit, receive |
| system.network.connections | | {connections} | Asynchronous UpDownCounter | 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) |

Expand Down Expand Up @@ -148,8 +148,8 @@ from
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} | 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.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 | - | - |

### `system.{os}.` - OS Specific System Metrics

Expand Down

0 comments on commit 4faebf4

Please sign in to comment.