# Klag — metrics

> Klag is an open-source Kafka consumer lag exporter built with Vert.x and Micrometer. It monitors consumer lag, lag velocity, hot partitions, time-based lag, data-loss risk, and consumer-group state, and exports to Prometheus, Datadog, or OTLP (OpenTelemetry). It also exposes an opt-in read-only MCP endpoint for AI agents. The docs include comparisons with other Kafka tools (Burrow, KMinion, AKHQ, Confluent Control Center, Redpanda Console, Grafana, Cruise Control) and guides on how Kafka consumer lag works, common monitoring mistakes, and detecting stuck consumers.

Full index: https://klag.dev/llms.txt | Full text: https://klag.dev/llms-full.txt

## Docs

- [Data Loss Prevention](https://klag.dev/metrics/data-loss-prevention/): Klag's retention-percent metric warns you before consumer lag exceeds Kafka retention and messages are permanently lost.
- [Hot Partitions](https://klag.dev/metrics/hot-partitions/): Klag detects partitions with statistically abnormal throughput so you can find skewed load and bottlenecks within a topic.
- [ISR Monitoring](https://klag.dev/metrics/isr/): Klag detects partitions whose in-sync replica set has shrunk below the full replica set, an early warning sign of reduced fault tolerance or brewing data loss.
- [Lag Velocity](https://klag.dev/metrics/lag-velocity/): How Klag measures whether consumer lag is growing or shrinking over time, so you can catch problems before they escalate.
- [Metrics Overview](https://klag.dev/metrics/overview/): The full catalog of metrics Klag exposes, covering consumer lag, offsets, group state, velocity, hot partitions, time-based lag, and data-loss prevention.
- [Time-Based Lag](https://klag.dev/metrics/time-based-lag/): Klag estimates consumer lag in milliseconds and seconds-to-catch-up, beyond raw message counts, using Kafka log timestamps with a poll-history fallback.
