KAFKA-19711: Add commit-rate metric to metered state stores Add commit metric#21853
Open
bbejeck wants to merge 2 commits intoapache:trunkfrom
Open
KAFKA-19711: Add commit-rate metric to metered state stores Add commit metric#21853bbejeck wants to merge 2 commits intoapache:trunkfrom
bbejeck wants to merge 2 commits intoapache:trunkfrom
Conversation
clolov
approved these changes
Mar 23, 2026
Comment on lines
329
to
330
| final KafkaMetric metric = metric("flush-rate"); | ||
| assertTrue((Double) metric.metricValue() > 0); |
Contributor
There was a problem hiding this comment.
The KIP mentions that while the flush metrics are only deprecated, they will no longer record any data under normal use, as Kafka Streams will no longer call StateStore#flush(), but this test seems to assert on a non-zero value. Is not recording flush metrics a next step?
Member
Author
There was a problem hiding this comment.
Good catch, no my intent was to do it in one step, that detail of the KIP slipped my mind. I'll update it.
…until next major release
Member
Author
|
@clolov I've updated the PR to only record for the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
commit-rate,commit-latency-avg, andcommit-latency-max metricsto replace the flush-* metrics which are now deprecated. Bothsets of metrics are recorded during the deprecation period for backward
compatibility. The flush-* metrics will be removed in the next major
release. Also adds a varargs overload of
StreamsMetricsImpl.maybeMeasureLatencyto support recording the samelatency on multiple sensors cleanly.