This documentation has an index for AI agents at /llms.txt. A Markdown version of this page is available at https://explorer.opentelemetry.io/collector/components/contrib/kafkareceiver.md.

Kafka Receiver

OpenTelemetry Collector receiver · contrib distribution

The Kafka Receiver receives telemetry data from Kafka, with configurable topics and encodings. If used in conjunction with the kafkaexporter configured with include_metadata_keys, The Kafka Receiver will also propagate the Kafka headers to the downstream pipeline, giving access to the rest of the pipeline to arbitrary metadata keys and values.

  • Component ID: contrib-kafkareceiver
  • Name: kafkareceiver
  • Type: receiver
  • Distribution: contrib
  • Repository: opentelemetry-collector-contrib

Stability

LevelSignals
betalogs, metrics, traces
developmentprofiles

Internal telemetry

MetricTypeValue typeUnitStabilityEnabledAttributesDescription
kafka_broker_closedsum (monotonic)int1developmentyesnode_id (int)The total number of connections closed. Only produced when franz-go is enabled.
kafka_broker_connectssum (monotonic)int1developmentyesnode_id (int), outcome (string)The total number of connections opened. Only produced when franz-go is enabled.
kafka_broker_throttling_durationhistogramintmsdeprecatedyesnode_id (int)The throttling duration in ms imposed by the broker when receiving messages. Only produced when franz-go is enabled. Deprecated in favor of kafka_broker_throttling_latency.
kafka_broker_throttling_latencyhistogramdoublesdevelopmentyesnode_id (int)The throttling latency in seconds imposed by the broker when receiving records. Only produced when franz-go is enabled.
kafka_receiver_bytessum (monotonic)intBydevelopmentyesnode_id (int), outcome (string), partition (int), topic (string)The size in bytes of received records seen by the broker. Only produced when franz-go is enabled.
kafka_receiver_bytes_uncompressedsum (monotonic)intBydevelopmentyesnode_id (int), outcome (string), partition (int), topic (string)The uncompressed size in bytes of received records seen by the client.
kafka_receiver_current_offsetgaugeint1developmentyespartition (int), topic (string)Current message offset
kafka_receiver_latencyhistogramintmsdeprecatedyesnode_id (int), outcome (string), partition (int), topic (string)The time it took in ms to receive a batch of messages. Only produced when franz-go is enabled. Deprecated in favor of kafka_receiver_read_latency.
kafka_receiver_messagessum (monotonic)int1deprecatedyesnode_id (int), outcome (string), partition (int), topic (string)The number of received messages. Deprecated in favor of kafka_receiver_records.
kafka_receiver_offset_laggaugeint1developmentyespartition (int), topic (string)Current offset lag
kafka_receiver_partition_closesum (monotonic)int1developmentyesNumber of finished partitions
kafka_receiver_partition_startsum (monotonic)int1developmentyesNumber of started partitions
kafka_receiver_read_latencyhistogramdoublesdevelopmentyesnode_id (int), outcome (string), partition (int), topic (string)The time it took in seconds to receive a batch of records. Only produced when franz-go is enabled.
kafka_receiver_recordssum (monotonic)int1developmentyesnode_id (int), outcome (string), partition (int), topic (string)The number of received records.
kafka_receiver_records_delayhistogramdoublesdevelopmentyespartition (int), topic (string)The time in seconds between producing and receiving a batch of records. Optional, only reported when enabled via config. Note that this metric may slow down high-volume consuming. Only produced when franz-go is enabled. This metric is reported with an assumption that the exporter and the receiver clocks are synchronized.
kafka_receiver_unmarshal_failed_log_recordssum (monotonic)int1developmentyespartition (int), topic (string)Number of log records failed to be unmarshaled
kafka_receiver_unmarshal_failed_metric_pointssum (monotonic)int1developmentyespartition (int), topic (string)Number of metric points failed to be unmarshaled
kafka_receiver_unmarshal_failed_profilessum (monotonic)int1developmentyespartition (int), topic (string)Number of profiles failed to be unmarshaled
kafka_receiver_unmarshal_failed_spanssum (monotonic)int1developmentyespartition (int), topic (string)Number of spans failed to be unmarshaled

Attributes

AttributeTypeDescription
node_idintThe Kafka node ID.
outcomestringThe operation outcome.
partitionintThe Kafka topic partition.
topicstringThe Kafka topic.

Data

  • JSON (latest): /data/collector/components/contrib-kafkareceiver/latest.json
  • JSON (pinned): /data/collector/components/contrib-kafkareceiver/contrib-kafkareceiver-28790d263fc2.json
  • Explore: /collector/components/contrib/kafkareceiver