# Kafka Exporter

<!-- llms-txt-link: /llms.txt -->

> OpenTelemetry Collector exporter · contrib distribution

- **Component ID**: `contrib-kafkaexporter`
- **Name**: `kafkaexporter`
- **Type**: exporter
- **Distribution**: contrib
- **Repository**: `opentelemetry-collector-contrib`

## Stability

| Level | Signals |
| --- | --- |
| beta | logs, metrics, traces |
| development | profiles |

## Internal telemetry

| Metric | Type | Value type | Unit | Stability | Enabled | Attributes | Description |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `kafka_broker_closed` | sum (monotonic) | int | 1 | development | yes | `node_id` (int), `server.address` (string) | The total number of connections closed. Only produced when franz-go is enabled. |
| `kafka_broker_connects` | sum (monotonic) | int | 1 | development | yes | `node_id` (int), `outcome` (string), `server.address` (string) | The total number of connections opened. Only produced when franz-go is enabled. |
| `kafka_broker_throttling_duration` | histogram | int | ms | deprecated | yes | `node_id` (int), `server.address` (string) | The throttling duration in ms imposed by the broker when exporting messages. Only produced when franz-go is enabled. Deprecated in favor of kafka_broker_throttling_latency. |
| `kafka_broker_throttling_latency` | histogram | double | s | development | yes | `node_id` (int), `server.address` (string) | The throttling latency in seconds imposed by the broker when exporting records. Only produced when franz-go is enabled. |
| `kafka_exporter_bytes` | sum (monotonic) | int | By | development | yes | `node_id` (int), `outcome` (string), `partition` (int), `server.address` (string), `topic` (string) | The size in bytes of exported records seen by the broker. Only produced when franz-go is enabled. |
| `kafka_exporter_bytes_uncompressed` | sum (monotonic) | int | By | development | yes | `node_id` (int), `outcome` (string), `partition` (int), `server.address` (string), `topic` (string) | The uncompressed size in bytes of exported messages seen by the client. |
| `kafka_exporter_latency` | histogram | int | ms | deprecated | yes | `node_id` (int), `outcome` (string), `partition` (int), `server.address` (string), `topic` (string) | The time it took in ms to export a batch of messages. Deprecated in favor of kafka_exporter_write_latency. |
| `kafka_exporter_messages` | sum (monotonic) | int | 1 | deprecated | yes | `node_id` (int), `outcome` (string), `partition` (int), `server.address` (string), `topic` (string) | The number of exported messages. Deprecated in favor of kafka_exporter_records. |
| `kafka_exporter_records` | sum (monotonic) | int | 1 | development | yes | `node_id` (int), `outcome` (string), `partition` (int), `server.address` (string), `topic` (string) | The number of exported records. |
| `kafka_exporter_write_latency` | histogram | double | s | development | yes | `node_id` (int), `outcome` (string), `partition` (int), `server.address` (string), `topic` (string) | The time it took in seconds to export a batch of records. |

## Attributes

| Attribute | Type | Description |
| --- | --- | --- |
| `node_id` | int | The Kafka node ID. |
| `outcome` | string | The operation outcome. |
| `partition` | int | The Kafka topic partition. |
| `server.address` | string | The Kafka node address. |
| `topic` | string | The Kafka topic. |

## Data

- **JSON (latest)**: [/data/collector/components/contrib-kafkaexporter/latest.json](/data/collector/components/contrib-kafkaexporter/latest.json)
- **JSON (pinned)**: [/data/collector/components/contrib-kafkaexporter/contrib-kafkaexporter-43ae123621f4.json](/data/collector/components/contrib-kafkaexporter/contrib-kafkaexporter-43ae123621f4.json)
- **Explore**: [/collector/components/contrib/kafkaexporter](/collector/components/contrib/kafkaexporter)
