Back to Projects

Expose and Scrape Java JMX Metrics for Kafka Streams

Exposing and scraping Kafka Streams JMX metrics within K8s

infrastructure SAP October 2022
Expose and Scrape Java JMX Metrics for Kafka Streams

Overview

Implemented comprehensive JMX metrics exposure and scraping for Kafka Streams applications running in Kubernetes, enabling detailed monitoring of stream processing performance.

Key Features

  • JMX Exporter: Deployed as sidecar for metric collection
  • Prometheus Integration: Service monitor configuration
  • Custom Dashboards: Stream processing visualization
  • Alert Rules: Proactive monitoring for critical metrics

Key Metrics Exposed

  • Processing rate and latency
  • Consumer lag per partition
  • State store metrics
  • Thread utilization
  • Commit and poll latencies

Technical Approach

  • JMX Exporter sidecar deployment
  • Prometheus service discovery
  • Grafana dashboard templates
  • Alert rules for high lag and failures

Tech Stack

Java Kafka Streams JMX Prometheus

Tags

Kafka Streams Monitoring JMX Kubernetes

More Projects