Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adding kafka brokers metrics #196

Closed
wants to merge 10 commits into from
Closed
20 changes: 18 additions & 2 deletions docs/messaging/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ This section defines how to apply semantic conventions when collecting Kafka met
| 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 |
Expand Down Expand Up @@ -159,4 +158,21 @@ This section defines how to apply semantic conventions when collecting Kafka met
| messaging.kafka.consumer.lag_sum | Gauge | Int64 | lag sum | `{lag sum}` | Current approximate sum of consumer group lag across all partitions of topic | `group` | The ID (string) of a consumer group |
| | | | | | | `topic` | The ID (integer) of a topic |

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md
### Broker Metrics

**Description:** Kafka Broker level metrics.

| Name | Instrument | Value type | Unit | Unit ([UCUM](/docs/general/metrics.md#instrument-units)) | Description | Attribute Key | Attribute Values |
| -------------------------------------------- | ------------- | ---------- | -------------------- | ----------------------------------------- | ----------------------------------- | ------------- | ---------------- |
| messaging.kafka.broker.count | Counter | Int64 | brokers | `{broker}` | Number of brokers in the cluster | | |
| messaging.kafka.broker.consumer_fetch_count | Counter | Double | fetches | `{fetch}/s` | Count of consumer fetches | `broker` | The ID (integer) of the broker |
| messaging.kafka.broker.incoming_byte_rate | Gauge | Double | bytes per second | `By/s` | Average Bytes received per second | `broker` | The ID (integer) of the broker |
| messaging.kafka.broker.outgoing_byte_rate | Gauge | Double | bytes per second | `By/s` | Average Bytes sent per second | `broker` | The ID (integer) of the broker |
| messaging.kafka.broker.requests_latency | Gauge | Double | ms | `{ms}` | Average Request latency in ms. | `broker` | The ID (integer) of the broker |
| messaging.kafka.broker.requests_count | Counter | Double | requests | `{request}/s` | Number of requests in the broker | `broker` | The ID (integer) of the broker |
| messaging.kafka.broker.requsts_size | Histogram | Double | bytes | `By` | Measures the size of the request | `broker` | The ID (integer) of the broker |
| messaging.kafka.broker.responses_count | Counter | Double | responses | `{response}/s` | Number of responses from the broker | `broker` | The ID (integer) of the broker |
| messaging.kafka.broker.response_size | Histogram | Double | bytes | `By` | Measures the size of the response | `broker` | The ID (integer) of the broker |
| messaging.kafka.broker.requests_in_flight | Gauge | Int64 | requests | `{request}` | Requests in flight. | `broker` | The ID (integer) of the broker |

[DocumentStatus]: https://github.com/open-telemetry/opentelemetry-specification/tree/v1.22.0/specification/document-status.md