KIP-1250 — Add metric to track size of in-memory state stores
Accepted Kafka 4.3 StreamsMetrics
Adds a num-keys metric to in-memory Kafka Streams state stores (InMemoryKeyValueStore, InMemorySessionStore, etc.) tracking the current number of entries. RocksDB stores expose an estimated key count metric, but in-memory stores emit no equivalent, leaving operators without visibility into memory pressure from state store growth.
Details
| Author | Evan Zhou |
| Status | Accepted |
| Kafka Version | 4.3 |
| JIRA | KAFKA-17895 |
| Wiki | View on Apache Wiki |
| Created | 2025-12-03 |
| Last Modified | 2026-02-13 |
Explore how this KIP affects the Kafka protocol in the Protocol Explorer, or see the full KIP database.