diff --git a/CHANGELOG.md b/CHANGELOG.md index bc4b5390cb1..e757a8fdf7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,9 @@ release. ### Semantic Conventions +- Fix grammatical number of metric units. + ([#3298](https://github.com/open-telemetry/opentelemetry-specification/pull/3298)) + ### Compatibility ### OpenTelemetry Protocol diff --git a/semantic_conventions/metrics/http.yaml b/semantic_conventions/metrics/http.yaml index cb23f27e927..f8696ac8b6d 100644 --- a/semantic_conventions/metrics/http.yaml +++ b/semantic_conventions/metrics/http.yaml @@ -17,7 +17,7 @@ groups: metric_name: http.server.active_requests brief: "Measures the number of concurrent HTTP requests that are currently in-flight." instrument: updowncounter - unit: "{requests}" + unit: "{request}" attributes: - ref: http.method - ref: http.status_code diff --git a/specification/metrics/semantic_conventions/README.md b/specification/metrics/semantic_conventions/README.md index 5efdc859f08..27dd44f9d75 100644 --- a/specification/metrics/semantic_conventions/README.md +++ b/specification/metrics/semantic_conventions/README.md @@ -102,7 +102,7 @@ Metric names SHOULD NOT be pluralized, unless the value being recorded represents discrete instances of a [countable quantity](https://en.wikipedia.org/wiki/Count_noun). Generally, the name SHOULD be pluralized only if the unit of the metric in -question is a non-unit (like `{faults}` or `{operations}`). +question is a non-unit (like `{fault}` or `{operation}`). Examples: @@ -180,10 +180,14 @@ more clarification in - Instruments for **utilization** metrics (that measure the fraction out of a total) are dimensionless and SHOULD use the default unit `1` (the unity). +- All non-units that use curly braces to annotate a quantity need to match the + grammatical number of the quantity it represent. For example if measuring the + number of individual requests to a process the unit would be `{request}`, not + `{requests}`. - Instruments that measure an integer count of something SHOULD only use [annotations](https://ucum.org/ucum.html#para-curly) with curly braces to give additional meaning *without* the leading default unit (`1`). For example, -use `{packets}`, `{errors}`, `{faults}`, etc. +use `{packet}`, `{error}`, `{fault}`, etc. ### Instrument Types diff --git a/specification/metrics/semantic_conventions/database-metrics.md b/specification/metrics/semantic_conventions/database-metrics.md index 82b4a564e67..63c1aebec14 100644 --- a/specification/metrics/semantic_conventions/database-metrics.md +++ b/specification/metrics/semantic_conventions/database-metrics.md @@ -31,7 +31,7 @@ instrumentations: | Name | Instrument | Unit | Unit ([UCUM](README.md#instrument-units)) | Description | |-------------------------------|----------------------------|-------------|-------------------------------------------|-------------------------------------------------------------------------------------------| -| `db.client.connections.usage` | UpDownCounter | connections | `{connections}` | The number of connections that are currently in state described by the `state` attribute. | +| `db.client.connections.usage` | UpDownCounter | connections | `{connection}` | The number of connections that are currently in state described by the `state` attribute. | All `db.client.connections.usage` measurements MUST include the following attribute: @@ -45,11 +45,11 @@ MUST NOT be used. | Name | Instrument ([*](README.md#instrument-types)) | Unit | Unit ([UCUM](README.md#instrument-units)) | Description | |------------------------------------------|----------------------------------------------|--------------|-------------------------------------------|---------------------------------------------------------------------------------------------------| -| `db.client.connections.idle.max` | UpDownCounter | connections | `{connections}` | The maximum number of idle open connections allowed. | -| `db.client.connections.idle.min` | UpDownCounter | connections | `{connections}` | The minimum number of idle open connections allowed. | -| `db.client.connections.max` | UpDownCounter | connections | `{connections}` | The maximum number of open connections allowed. | -| `db.client.connections.pending_requests` | UpDownCounter | requests | `{requests}` | The number of pending requests for an open connection, cumulative for the entire pool. | -| `db.client.connections.timeouts` | Counter | timeouts | `{timeouts}` | The number of connection timeouts that have occurred trying to obtain a connection from the pool. | +| `db.client.connections.idle.max` | UpDownCounter | connections | `{connection}` | The maximum number of idle open connections allowed. | +| `db.client.connections.idle.min` | UpDownCounter | connections | `{connection}` | The minimum number of idle open connections allowed. | +| `db.client.connections.max` | UpDownCounter | connections | `{connection}` | The maximum number of open connections allowed. | +| `db.client.connections.pending_requests` | UpDownCounter | requests | `{request}` | The number of pending requests for an open connection, cumulative for the entire pool. | +| `db.client.connections.timeouts` | Counter | timeouts | `{timeout}` | The number of connection timeouts that have occurred trying to obtain a connection from the pool. | | `db.client.connections.create_time` | Histogram | milliseconds | `ms` | The time it took to create a new connection. | | `db.client.connections.wait_time` | Histogram | milliseconds | `ms` | The time it took to obtain an open connection from the pool. | | `db.client.connections.use_time` | Histogram | milliseconds | `ms` | The time between borrowing a connection and returning it to the pool. | diff --git a/specification/metrics/semantic_conventions/faas-metrics.md b/specification/metrics/semantic_conventions/faas-metrics.md index 72d2e48e18d..2cdff199d25 100644 --- a/specification/metrics/semantic_conventions/faas-metrics.md +++ b/specification/metrics/semantic_conventions/faas-metrics.md @@ -40,10 +40,10 @@ Below is a table of FaaS invocation metric instruments. |------------------------|---------------------------------------------------|--------------|-------------------------------------------|------------------------------------------------------------------------------| | `faas.invoke_duration` | Histogram | milliseconds | `ms` | Measures the duration of the invocation | | `faas.init_duration` | Histogram | milliseconds | `ms` | Measures the duration of the function's initialization, such as a cold start | -| `faas.coldstarts` | Counter | default unit | `{coldstarts}` | Number of invocation cold starts. | -| `faas.errors` | Counter | default unit | `{errors}` | Number of invocation errors. | -| `faas.invocations` | Counter | default unit | `{invocations}` | Number of successful invocations. | -| `faas.timeouts` | Counter | default unit | `{timeouts}` | Number of invocation timeouts. | +| `faas.coldstarts` | Counter | default unit | `{coldstart}` | Number of invocation cold starts. | +| `faas.errors` | Counter | default unit | `{error}` | Number of invocation errors. | +| `faas.invocations` | Counter | default unit | `{invocation}` | Number of successful invocations. | +| `faas.timeouts` | Counter | default unit | `{timeout}` | Number of invocation timeouts. | Optionally, when applicable: diff --git a/specification/metrics/semantic_conventions/hardware-metrics.md b/specification/metrics/semantic_conventions/hardware-metrics.md index cdda1211c5b..ed256fddf47 100644 --- a/specification/metrics/semantic_conventions/hardware-metrics.md +++ b/specification/metrics/semantic_conventions/hardware-metrics.md @@ -56,7 +56,7 @@ The below metrics apply to any type of hardware component. | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key(s) | Attribute Values | | ----------- | ---------------------------------------------------------------------------------- | -------- | ------------------------------------------------- | ---------- | ------------------ | -------------------------- | | `hw.energy` | Energy consumed by the component, in joules | J | Counter | Int64 | | | -| `hw.errors` | Number of errors encountered by the component | {errors} | Counter | Int64 | `type` (optional) | | +| `hw.errors` | Number of errors encountered by the component | {error} | Counter | Int64 | `type` (optional) | | | `hw.power` | Instantaneous power consumed by the component, in Watts (`hw.energy` is preferred) | W | Gauge | Double | | | | `hw.status` | Operational status: `1` (true) or `0` (false) for each of the possible states | | UpDownCounter | Int | `state` (required) | `ok`, `degraded`, `failed` | @@ -116,7 +116,7 @@ many individual cores. | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | | -------------------- | ----------------------------------------------------------------------------- | -------- | ------------------------------------------------- | ---------- | -------------------------- | ----------------------------------------------- | -| `hw.errors` | Total number of errors encountered and corrected by the CPU | {errors} | Counter | Int64 | `hw.type` (required) | `cpu` | +| `hw.errors` | Total number of errors encountered and corrected by the CPU | {error} | Counter | Int64 | `hw.type` (required) | `cpu` | | `hw.cpu.speed` | CPU current frequency | Hz | Gauge | Int64 | | | | `hw.cpu.speed.limit` | CPU maximum frequency | Hz | Gauge | Int64 | `limit_type` (recommended) | `throttled`, `max`, `turbo` | | `hw.status` | Operational status: `1` (true) or `0` (false) for each of the possible states | | UpDownCounter | Int | `state` (required) | `ok`, `degraded`, `failed`, `predicted_failure` | @@ -194,7 +194,7 @@ Additional **optional** attributes: | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | | --------------------------- | ----------------------------------------------------------------------------- | -------- | ------------------------------------------------- | ---------- | ---------------------- | ----------------------------------------------- | -| `hw.errors` | Number of errors encountered by the GPU | {errors} | Counter | Int64 | `type` (recommended) | `corrected`, `all` | +| `hw.errors` | Number of errors encountered by the GPU | {error} | Counter | Int64 | `type` (recommended) | `corrected`, `all` | | | | | | | `hw.type` (required) | `gpu` | | `hw.gpu.io` | Received and transmitted bytes by the GPU | By | Counter | Int64 | `direction` (required) | `receive`, `transmit` | | `hw.gpu.memory.limit` | Size of the GPU memory | By | UpDownCounter | Int64 | | | @@ -223,7 +223,7 @@ as /dev/hdd0 by the controller). | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | | ----------------------------- | ----------------------------------------------------------------------------- | -------- | ------------------------------------------------- | ---------- | -------------------- | -------------------------- | -| `hw.errors` | Number of errors encountered on this logical disk | {errors} | Counter | Int64 | `hw.type` (required) | `logical_disk` | +| `hw.errors` | Number of errors encountered on this logical disk | {error} | Counter | Int64 | `hw.type` (required) | `logical_disk` | | `hw.logical_disk.limit` | Size of the logical disk | By | UpDownCounter | Int64 | | | | `hw.logical_disk.usage` | Logical disk space usage | By | UpDownCounter | Int64 | `state` (required) | `used`, `free` | | `hw.logical_disk.utilization` | Logical disk space utilization as a fraction | 1 | Gauge | Double | `state` (required) | `used`, `free` | @@ -242,7 +242,7 @@ Additional **optional** attributes: | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | | ---------------- | ----------------------------------------------------------------------------- | -------- | ------------------------------------------------- | ---------- | -------------------- | ----------------------------------------------- | -| `hw.errors` | Number of errors encountered on this memory module | {errors} | Counter | Int64 | `hw.type` (required) | `memory` | +| `hw.errors` | Number of errors encountered on this memory module | {error} | Counter | Int64 | `hw.type` (required) | `memory` | | `hw.memory.size` | Size of the memory module | By | UpDownCounter | Int64 | | | | `hw.status` | Operational status: `1` (true) or `0` (false) for each of the possible states | | UpDownCounter | Int | `state` (required) | `ok`, `degraded`, `failed`, `predicted_failure` | | | | | | | `hw.type` (required) | `memory` | @@ -264,12 +264,12 @@ an HBA, an fiber channel port or a Wi-Fi adapter. | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | | ---------------------------------- | ------------------------------------------------------------------------------------------------------------ | --------- | ------------------------------------------------- | ---------- | ---------------------- | --------------------------- | -| `hw.errors` | Number of errors encountered by the network adapter | {errors} | Counter | Int64 | `type` (recommended) | `all`, `zero_buffer_credit` | +| `hw.errors` | Number of errors encountered by the network adapter | {error} | Counter | Int64 | `type` (recommended) | `all`, `zero_buffer_credit` | | | | | | | `hw.type` (required) | `network` | | `hw.network.bandwidth.limit` | Link speed | By | UpDownCounter | Int64 | | | | `hw.network.bandwidth.utilization` | Utilization of the network bandwidth as a fraction | 1 | Gauge | Double | | | | `hw.network.io` | Received and transmitted network traffic in bytes | By | Counter | Int64 | `direction` (required) | `receive`, `transmit` | -| `hw.network.packets` | Received and transmitted network traffic in packets (or frames) | {packets} | Counter | Int64 | `direction` (required) | `receive`, `transmit` | +| `hw.network.packets` | Received and transmitted network traffic in packets (or frames) | {packet} | Counter | Int64 | `direction` (required) | `receive`, `transmit` | | `hw.network.up` | Link status: `1` (up) or `0` (down) | | UpDownCounter | Int | | | | `hw.status` | Operational status, regardless of the link status: `1` (true) or `0` (false) for each of the possible states | | UpDownCounter | Int | `state` (required) | `ok`, `degraded`, `failed` | | | | | | | `hw.type` (required) | `network` | @@ -290,7 +290,7 @@ Additional **optional** attributes: | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | | ---------------------------------------- | ------------------------------------------------------------------------------------------- | -------- | ------------------------------------------------- | ---------- | ------------------------------- | ----------------------------------------------- | -| `hw.errors` | Number of errors encountered on this disk | {errors} | Counter | Int64 | `hw.type` (required) | `physical_disk` | +| `hw.errors` | Number of errors encountered on this disk | {error} | Counter | Int64 | `hw.type` (required) | `physical_disk` | | `hw.physical_disk.endurance_utilization` | Endurance remaining for this SSD disk | 1 | Gauge | Double | `state` (required) | `remaining` | | `hw.physical_disk.size` | Size of the disk | By | UpDownCounter | Int64 | | | | `hw.physical_disk.smart` | Value of the corresponding [S.M.A.R.T.](https://en.wikipedia.org/wiki/S.M.A.R.T.) attribute | 1 | Gauge | Int | `smart_attribute` (recommended) | `Seek Error Rate`, `Spin Retry Count`, etc. | @@ -334,8 +334,8 @@ virtual tape libraries) | Name | Description | Units | Instrument Type ([*](README.md#instrument-types)) | Value Type | Attribute Key | Attribute Values | | -------------------------- | ----------------------------------------------------------------------------- | ------------ | ------------------------------------------------- | ---------- | -------------------- | -------------------------------------------- | -| `hw.errors` | Number of errors encountered by the tape drive | {errors} | Counter | Int64 | `hw.type` | `tape_drive` | -| `hw.tape_drive.operations` | Operations performed by the tape drive | {operations} | Counter | Int64 | `type` (recommended) | `mount`, `unmount`, `clean` | +| `hw.errors` | Number of errors encountered by the tape drive | {error} | Counter | Int64 | `hw.type` | `tape_drive` | +| `hw.tape_drive.operations` | Operations performed by the tape drive | {operation} | Counter | Int64 | `type` (recommended) | `mount`, `unmount`, `clean` | | `hw.status` | Operational status: `1` (true) or `0` (false) for each of the possible states | | UpDownCounter | Int | `state` (required) | `ok`, `degraded`, `failed`, `needs_cleaning` | | | | | | | `hw.type` (required) | `tape_drive` | diff --git a/specification/metrics/semantic_conventions/http-metrics.md b/specification/metrics/semantic_conventions/http-metrics.md index e69a78b6566..c5cb81a5db0 100644 --- a/specification/metrics/semantic_conventions/http-metrics.md +++ b/specification/metrics/semantic_conventions/http-metrics.md @@ -76,7 +76,7 @@ This metric is optional. | Name | Instrument Type | Unit (UCUM) | Description | | -------- | --------------- | ----------- | -------------- | -| `http.server.active_requests` | UpDownCounter | `{requests}` | Measures the number of concurrent HTTP requests that are currently in-flight. | +| `http.server.active_requests` | UpDownCounter | `{request}` | Measures the number of concurrent HTTP requests that are currently in-flight. | diff --git a/specification/metrics/semantic_conventions/instrumentation/kafka.md b/specification/metrics/semantic_conventions/instrumentation/kafka.md index 453a30efa56..b1114056094 100644 --- a/specification/metrics/semantic_conventions/instrumentation/kafka.md +++ b/specification/metrics/semantic_conventions/instrumentation/kafka.md @@ -22,28 +22,28 @@ This document defines how to apply semantic conventions when instrumenting Kafka | Name | Instrument | Value type | Unit | Unit ([UCUM](../README.md#instrument-units)) | Description | Attribute Key | Attribute Values | | ---------------------------------------------| ------------- | ---------- | ------ | -------------------------------------------- | -------------- | ------------- | ---------------- | -| messaging.kafka.messages | Counter | Int64 | messages | `{messages}` | The number of messages received by the broker. | | | -| messaging.kafka.requests.failed | Counter | Int64 | requests | `{requests}` | The number of requests to the broker resulting in a failure. | `type` | `produce`, `fetch` | -| messaging.kafka.requests.queue | UpDownCounter | Int64 | requests | `{requests}` | The number of requests in the request queue. | | | +| messaging.kafka.messages | Counter | Int64 | messages | `{message}` | The number of messages received by the broker. | | | +| messaging.kafka.requests.failed | Counter | Int64 | requests | `{request}` | The number of requests to the broker resulting in a failure. | `type` | `produce`, `fetch` | +| messaging.kafka.requests.queue | UpDownCounter | Int64 | requests | `{request}` | The number of requests in the request queue. | | | | messaging.kafka.network.io | Counter | Int64 | bytes | `by` | The bytes received or sent by the broker. | `state` | `in`, `out` | -| messaging.kafka.purgatory.size | UpDownCounter | Int64 | requests | `{requests}` | The number of requests waiting in the purgatory. | `type` | `produce`, `fetch` | -| messaging.kafka.partitions.all | UpDownCounter | Int64 | partitions | `{partitions}` | The number of partitions in the broker. | | | -| messaging.kafka.partitions.offline | UpDownCounter | Int64 | partitions | `{partitions}` | The number of offline partitions. | | | -| messaging.kafka.partitions.under-replicated | UpDownCounter | Int64 | partition | `{partitions}` | The number of under replicated partitions. | | | -| messaging.kafka.isr.operations | Counter | Int64 | operations | `{operations}` | The number of in-sync replica shrink and expand operations. | `operation` | `shrink`, `expand` | +| messaging.kafka.purgatory.size | UpDownCounter | Int64 | requests | `{request}` | The number of requests waiting in the purgatory. | `type` | `produce`, `fetch` | +| messaging.kafka.partitions.all | UpDownCounter | Int64 | partitions | `{partition}` | The number of partitions in the broker. | | | +| messaging.kafka.partitions.offline | UpDownCounter | Int64 | partitions | `{partition}` | The number of offline partitions. | | | +| messaging.kafka.partitions.under-replicated | UpDownCounter | Int64 | partition | `{partition}` | The number of under replicated partitions. | | | +| messaging.kafka.isr.operations | Counter | Int64 | operations | `{operation}` | The number of in-sync replica shrink and expand operations. | `operation` | `shrink`, `expand` | | messaging.kafka.lag_max | Gauge | Int64 | lag max | `{lag max}` | Max lag in messages between follower and leader replicas. | | | -| messaging.kafka.controllers.active | UpDownCounter | Int64 | controllers | `{controllers}` | The number of active controllers in the broker. | | | -| messaging.kafka.leader.elections | Counter | Int64 | elections | `{elections}` | Leader election rate (increasing values indicates broker failures). | | | -| messaging.kafka.leader.unclean-elections | Counter | Int64 | elections | `{elections}` | Unclean leader election rate (increasing values indicates broker failures). | | | -| messaging.kafka.brokers | UpDownCounter | Int64 | brokers | `{brokers}` | Number of brokers in the cluster. | | | -| messaging.kafka.topic.partitions | UpDownCounter | Int64 | partitions | `{partitions}` | Number of partitions in topic. | `topic` | The ID (integer) of a topic | +| messaging.kafka.controllers.active | UpDownCounter | Int64 | controllers | `{controller}` | The number of active controllers in the broker. | | | +| messaging.kafka.leader.elections | Counter | Int64 | elections | `{election}` | Leader election rate (increasing values indicates broker failures). | | | +| messaging.kafka.leader.unclean-elections | Counter | Int64 | elections | `{election}` | Unclean leader election rate (increasing values indicates broker failures). | | | +| messaging.kafka.brokers | UpDownCounter | Int64 | brokers | `{broker}` | Number of brokers in the cluster. | | | +| messaging.kafka.topic.partitions | UpDownCounter | Int64 | partitions | `{partition}` | Number of partitions in topic. | `topic` | The ID (integer) of a topic | | messaging.kafka.partition.current_offset | Gauge | Int64 | partition offset | `{partition offset}` | Current offset of partition of topic. | `topic` | The ID (integer) of a topic | | | | | | | | `partition` | The number (integer) of the partition | | messaging.kafka.partition.oldest_offset | Gauge | Int64 | partition offset | `{partition offset}` | Oldest offset of partition of topic | `topic` | The ID (integer) of a topic | | | | | | | | `partition` | The number (integer) of the partition | -| messaging.kafka.partition.replicas.all | UpDownCounter | Int64 | replicas | `{replicas}` | Number of replicas for partition of topic | `topic` | The ID (integer) of a topic | +| messaging.kafka.partition.replicas.all | UpDownCounter | Int64 | replicas | `{replica}` | Number of replicas for partition of topic | `topic` | The ID (integer) of a topic | | | | | | | | `partition` | The number (integer) of the partition | -| messaging.kafka.partition.replicas.in_sync | UpDownCounter | Int64 | replicas | `{replicas}` | Number of synchronized replicas of partition | `topic` | The ID (integer) of a topic | +| messaging.kafka.partition.replicas.in_sync | UpDownCounter | Int64 | replicas | `{replica}` | Number of synchronized replicas of partition | `topic` | The ID (integer) of a topic | | | | | | | | `partition` | The number (integer) of the partition| ## Kafka Producer Metrics @@ -53,16 +53,16 @@ This document defines how to apply semantic conventions when instrumenting Kafka | Name | Instrument | Value type | Unit | Unit ([UCUM](../README.md#instrument-units)) | Description | Attribute Key | Attribute Values | | --------------------------------------------- | ------------- | ---------- | ------ | -------------------------------------------- | -------------- | ------------- | ---------------- | | messaging.kafka.producer.outgoing-bytes.rate | Gauge | Double | bytes per second | `by/s` | The average number of outgoing bytes sent per second to all servers. | `client-id` | `client-id` value | -| messaging.kafka.producer.responses.rate | Gauge | Double | responses per second | `{responses}/s` | The average number of responses received per second. | `client-id` | `client-id` value | +| messaging.kafka.producer.responses.rate | Gauge | Double | responses per second | `{response}/s` | The average number of responses received per second. | `client-id` | `client-id` value | | messaging.kafka.producer.bytes.rate | Gauge | Double | bytes per second | `by/s` | The average number of bytes sent per second for a specific topic. | `client-id` | `client-id` value | | | | | | | | `topic` | topic name | | messaging.kafka.producer.compression-ratio | Gauge | Double | compression ratio | `{compression}` | The average compression ratio of record batches for a specific topic. | `client-id` | `client-id` value | | | | | | | | `topic` | topic name | -| messaging.kafka.producer.record-error.rate | Gauge | Double | error rate | `{errors}/s` | The average per-second number of record sends that resulted in errors for a specific topic. | `client-id` | `client-id` value | +| messaging.kafka.producer.record-error.rate | Gauge | Double | error rate | `{error}/s` | The average per-second number of record sends that resulted in errors for a specific topic. | `client-id` | `client-id` value | | | | | | | | `topic` | topic name | -| messaging.kafka.producer.record-retry.rate | Gauge | Double | retry rate | `{retries}/s` | The average per-second number of retried record sends for a specific topic. | `client-id` | `client-id` value | +| messaging.kafka.producer.record-retry.rate | Gauge | Double | retry rate | `{retry}/s` | The average per-second number of retried record sends for a specific topic. | `client-id` | `client-id` value | | | | | | | | `topic` | topic name | -| messaging.kafka.producer.record-sent.rate | Gauge | Double | records sent rate | `{records_sent}/s` | The average number of records sent per second for a specific topic. | `client-id` | `client-id` value | +| messaging.kafka.producer.record-sent.rate | Gauge | Double | records sent rate | `{record_sent}/s` | The average number of records sent per second for a specific topic. | `client-id` | `client-id` value | | | | | | | | `topic` | topic name | ## Kafka Consumer Metrics @@ -71,7 +71,7 @@ This document defines how to apply semantic conventions when instrumenting Kafka | Name | Instrument | Value type | Unit | Unit ([UCUM](../README.md#instrument-units)) | Description | Attribute Key | Attribute Values | | --------------------------------------------- | ------------- | ---------- | ------ | -------------------------------------------- | -------------- | ------------- | ---------------- | -| messaging.kafka.consumer.members | UpDownCounter | Int64 | members | `{members}` | Count of members in the consumer group | `group` | The ID (string) of a consumer group | +| messaging.kafka.consumer.members | UpDownCounter | Int64 | members | `{member}` | Count of members in the consumer group | `group` | The ID (string) of a consumer group | | messaging.kafka.consumer.offset | Gauge | Int64 | offset | `{offset}` | Current offset of the consumer group at partition of topic | `group` | The ID (string) of a consumer group | | | | | | | | `topic` | The ID (integer) of a topic | | | | | | | | `partition` | The number (integer) of the partition | diff --git a/specification/metrics/semantic_conventions/process-metrics.md b/specification/metrics/semantic_conventions/process-metrics.md index 0f44943eb01..529fdca299a 100644 --- a/specification/metrics/semantic_conventions/process-metrics.md +++ b/specification/metrics/semantic_conventions/process-metrics.md @@ -39,10 +39,10 @@ Below is a table of Process metric instruments. | `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. | | +| `process.threads` | UpDownCounter | {thread} | Process threads count. | | | `process.open_file_descriptors` | UpDownCounter | {count} | Number of file descriptors in use by the process. | | | `process.context_switches` | Counter | {count} | Number of times the process has been context switched. | `type` SHOULD be one of: `involuntary`, `voluntary` | -| `process.paging.faults` | Counter | {faults} | Number of page faults the process has made. | `type`, if specified, SHOULD be one of: `major` (for major, or hard, page faults), `minor` (for minor, or soft, page faults). | +| `process.paging.faults` | Counter | {fault} | Number of page faults the process has made. | `type`, if specified, SHOULD be one of: `major` (for major, or hard, page faults), `minor` (for minor, or soft, page faults). | ## Attributes diff --git a/specification/metrics/semantic_conventions/runtime-environment-metrics.md b/specification/metrics/semantic_conventions/runtime-environment-metrics.md index 5b68cb22a4b..84a1eaa4ba2 100644 --- a/specification/metrics/semantic_conventions/runtime-environment-metrics.md +++ b/specification/metrics/semantic_conventions/runtime-environment-metrics.md @@ -73,16 +73,16 @@ All JVM metric attributes are required unless otherwise indicated. | | | | | | | pool | Name of pool [1] | | process.runtime.jvm.memory.usage_after_last_gc | Measure of memory used, as measured after the most recent garbage collection event on this pool | Bytes | `By` | UpDownCounter | Int64 | type | `"heap"`, `"non_heap"` | | | | | | | | pool | Name of pool [1] | -| process.runtime.jvm.threads.count | Number of executing threads | threads | `{threads}` | UpDownCounter | Int64 | daemon | `true`, `false` | -| process.runtime.jvm.classes.loaded | Number of classes loaded since JVM start | classes | `{classes}` | Counter | Int64 | | | -| process.runtime.jvm.classes.unloaded | Number of classes unloaded since JVM start | classes | `{classes}` | Counter | Int64 | | | -| process.runtime.jvm.classes.current_loaded | Number of classes currently loaded | classes | `{classes}` | UpDownCounter | Int64 | | | +| process.runtime.jvm.threads.count | Number of executing threads | threads | `{thread}` | UpDownCounter | Int64 | daemon | `true`, `false` | +| process.runtime.jvm.classes.loaded | Number of classes loaded since JVM start | classes | `{class}` | Counter | Int64 | | | +| process.runtime.jvm.classes.unloaded | Number of classes unloaded since JVM start | classes | `{class}` | Counter | Int64 | | | +| process.runtime.jvm.classes.current_loaded | Number of classes currently loaded | classes | `{class}` | UpDownCounter | Int64 | | | | process.runtime.jvm.cpu.utilization | Recent CPU utilization for the process [2] | 1 | 1 | Asynchronous Gauge | Double | | | | process.runtime.jvm.system.cpu.utilization | Recent CPU utilization for the whole system [2] | 1 | 1 | Asynchronous Gauge | Double | | | | process.runtime.jvm.system.cpu.load_1m | Average CPU load of the whole system for the last minute | 1 | 1 | Asynchronous Gauge | Double | | | | process.runtime.jvm.buffer.usage | Measure of memory used by buffers | Bytes | `By` | UpDownCounter | Int64 | pool | Name of pool[3] | | process.runtime.jvm.buffer.limit | Measure of total memory capacity of buffers | Bytes | `By` | UpDownCounter | Int64 | pool | Name of pool[3] | -| process.runtime.jvm.buffer.count | Number of buffers in the pool | buffers | `{buffers}` | UpDownCounter | Int64 | pool | Name of pool[3] | +| process.runtime.jvm.buffer.count | Number of buffers in the pool | buffers | `{buffer}` | UpDownCounter | Int64 | pool | Name of pool[3] | | process.runtime.jvm.gc.duration | Duration of JVM garbage collection actions | Milliseconds | `ms` | Histogram | Int64 | gc | Name of gc[4] | | | | | | | | action | The gc action[4] | diff --git a/specification/metrics/semantic_conventions/system-metrics.md b/specification/metrics/semantic_conventions/system-metrics.md index 739cef68596..44b5059bbeb 100644 --- a/specification/metrics/semantic_conventions/system-metrics.md +++ b/specification/metrics/semantic_conventions/system-metrics.md @@ -58,8 +58,8 @@ memory](#systempaging---pagingswap-metrics). |---------------------------|-------------------------------------|--------------|---------------------------------------------------|------------|---------------|------------------| | 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 | +| system.paging.faults | | {fault} | Counter | Int64 | type | major, minor | +| system.paging.operations | | {operation} | Counter | Int64 | type | major, minor | | | | | | | direction | in, out | ### `system.disk.` - Disk controller metrics @@ -70,12 +70,12 @@ memory](#systempaging---pagingswap-metrics). |--------------------------------------------|-------------------------------------------------|--------------|---------------------------------------------------|------------|---------------|------------------| | system.disk.io | | By | Counter | Int64 | device | (identifier) | | | | | | | direction | read, write | -| system.disk.operations | | {operations} | Counter | Int64 | device | (identifier) | +| system.disk.operations | | {operation} | 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) | +| system.disk.merged | | {operation} | Counter | Int64 | device | (identifier) | | | | | | | direction | read, write | 1 The real elapsed time ("wall clock") @@ -120,15 +120,15 @@ perf counter (similar for Writes) | 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) | +| system.network.dropped\[1\] | Count of packets that are dropped or discarded even though there was no error | {packet} | Counter | Int64 | device | (identifier) | | | | | | | direction | transmit, receive | -| system.network.packets | | {packets} | Counter | Int64 | device | (identifier) | +| system.network.packets | | {packet} | Counter | Int64 | device | (identifier) | | | | | | | direction | transmit, receive | -| system.network.errors\[2\] | Count of network errors detected | {errors} | Counter | Int64 | device | (identifier) | +| system.network.errors\[2\] | Count of network errors detected | {error} | 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) | +| system.network.connections | | {connection} | 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. | @@ -157,8 +157,8 @@ 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 | - | - | +| system.processes.count | Total number of processes in each state | {process} | 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 | {process} | Counter | Int64 | - | - | ### `system.{os}.` - OS Specific System Metrics