• /
  • EnglishEspañolFrançais日本語한국어Português
  • Log inStart now

OpenTelemetry Kafka metrics reference

This page documents the metrics collected when monitoring Apache Kafka with OpenTelemetry. Metrics are collected via the Kafka metrics receiver, JMX metrics (from OpenTelemetry Java Agent or Prometheus JMX Exporter), and OpenTelemetry Java agent for client-side metrics.

Metric collection methods

OpenTelemetry Kafka monitoring uses two complementary collection methods:

  • Kafka metrics receiver: Connects to Kafka's bootstrap port to collect cluster, topic, partition, and consumer group metrics
  • JMX metrics: Collected via OpenTelemetry Java Agent (self-hosted) or Prometheus JMX Exporter (Kubernetes) to gather detailed broker metrics and JVM metrics

Kafka metrics receiver metrics

These metrics are collected from Kafka brokers using the Kafka protocol (bootstrap port). Based on the kafkametricsreceiver metadata, with some metrics disabled by default or in typical configurations.

JMX metrics

JMX metrics provide detailed Kafka broker and JVM telemetry. These metrics are collected using:

Both methods collect the same set of Kafka broker and JVM metrics documented below:

Kafka client metrics (OpenTelemetry Java agent)

These metrics are collected from Kafka producer and consumer applications instrumented with the OpenTelemetry Java agent with Kafka instrumentation enabled. These provide client-side visibility into application interactions with Kafka brokers and complement the broker-side metrics by providing the application perspective.

Metric attributes

Metrics can be filtered and grouped using the following attributes:

Common attributes:

  • kafka.cluster.name - Name of the Kafka cluster (all metrics)
  • instrumentation.provider - Always opentelemetry (all metrics)
  • topic - Kafka topic name
  • partition - Partition number
  • group - Consumer group name
  • broker.id - Broker identifier (JMX metrics)
  • client-id - Client identifier (client metrics)
  • node-id - Broker node identifier (client metrics)
  • type - Request type (e.g., fetch, produce)
  • direction - Data direction (in, out)
  • state - ISR operation state (shrink, expand)
  • name - GC collector or memory pool name (JVM metrics)

Next steps

Copyright © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.