This is an automated email from the ASF dual-hosted git repository.

bbejeck pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/trunk by this push:
     new df49f94a736 MINOR: Add documentation for the num-keys metric 
introduced by KIP-1250 (#22258)
df49f94a736 is described below

commit df49f94a736be595ef691cf5fbd1901674c7d20d
Author: Evan Zhou <[email protected]>
AuthorDate: Wed May 27 10:11:42 2026 -0500

    MINOR: Add documentation for the num-keys metric introduced by KIP-1250 
(#22258)
    
    Updates docs/operations/monitoring.md to include the `num-keys` metric
    for in-memory state stores introduced by KIP-1250
    
    KIP:
    
https://cwiki.apache.org/confluence/display/KAFKA/KIP-1250%3A+Add+metric+to+track+size+of+in-memory+state+stores
    
    Reviewers: Bill Bejeck <[email protected]>
---
 docs/operations/monitoring.md | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/docs/operations/monitoring.md b/docs/operations/monitoring.md
index c7f22f3b166..10d4c7067b9 100644
--- a/docs/operations/monitoring.md
+++ b/docs/operations/monitoring.md
@@ -5081,7 +5081,7 @@ 
kafka.streams:type=stream-topic-metrics,thread-id=([-.\w]+),task-id=([-.\w]+),pr
 
 ### State Store Metrics
 
-All the following metrics have a recording level of `debug`, except for the 
`record-e2e-latency-*` metrics which have a recording level `trace` and 
`num-open-iterators` which has recording level `info`. Note that the 
`store-scope` value is specified in `StoreSupplier#metricsScope()` for user's 
customized state stores; for built-in state stores, currently we have: 
+All the following metrics have a recording level of `debug`, except for the 
`record-e2e-latency-*` metrics which have a recording level `trace` and 
`num-open-iterators` and `num-keys` which have recording level `info`. Note 
that the `store-scope` value is specified in `StoreSupplier#metricsScope()` for 
user's customized state stores; for built-in state stores, currently we have: 
 
   * `in-memory-state`
   * `in-memory-lru-state`
@@ -5642,6 +5642,19 @@ 
kafka.streams:type=stream-state-metrics,thread-id=([-.\w]+),task-id=([-.\w]+),[s
 <tr>  
 <td>
 
+num-keys
+</td>  
+<td>
+
+The current number of keys in the in-memory state store. Only reported for 
in-memory state stores; not available for RocksDB-backed stores.
+</td>  
+<td>
+
+kafka.streams:type=stream-state-metrics,thread-id=([-.\w]+),task-id=([-.\w]+),[store-scope]-id=([-.\w]+)
+</td> </tr>  
+<tr>  
+<td>
+
 iterator-duration-avg
 </td>  
 <td>

Reply via email to