From afd325bf5d43bc6e01ec15d3a0af2978bc1c0ba7 Mon Sep 17 00:00:00 2001 From: "A. Sophie Blee-Goldman" Date: Mon, 30 May 2022 15:43:16 -0700 Subject: [PATCH 01/30] add bytes/records consumed/produced metrics --- docs/ops.html | 4 +- .../processor/internals/ClientUtils.java | 22 +++++ .../processor/internals/PartitionGroup.java | 2 +- .../processor/internals/ProcessorNode.java | 6 +- .../processor/internals/RecordCollector.java | 18 ++-- .../internals/RecordCollectorImpl.java | 22 +++-- .../processor/internals/RecordQueue.java | 46 ++++----- .../streams/processor/internals/SinkNode.java | 32 +++++- .../processor/internals/SourceNode.java | 1 - .../processor/internals/StreamTask.java | 2 +- .../metrics/ProcessorNodeMetrics.java | 99 ++++++++++++++++++- .../internals/metrics/TaskMetrics.java | 6 +- .../integration/MetricsIntegrationTest.java | 18 ++-- .../metrics/ProcessorNodeMetricsTest.java | 2 +- .../internals/metrics/TaskMetricsTest.java | 2 +- .../state/KeyValueStoreTestDriver.java | 40 ++++---- .../kafka/test/MockRecordCollector.java | 44 +++++---- 17 files changed, 259 insertions(+), 107 deletions(-) diff --git a/docs/ops.html b/docs/ops.html index 843c5cc59e375..0c1973bd694a3 100644 --- a/docs/ops.html +++ b/docs/ops.html @@ -2308,7 +2308,7 @@

Streams Monitoring

A Kafka Streams instance contains all the producer and consumer metrics as well as additional metrics specific to Streams. - By default Kafka Streams has metrics with three recording levels: info, debug, and trace. + The metrics have three recording levels: info, debug, and trace.

Note that the metrics have a 4-layer hierarchy. At the top level there are client-level metrics for each started @@ -2617,7 +2617,7 @@

State Store Metrics
-All of the following metrics have a recording level of debug, except for the record-e2e-latency-* metrics which have a recording level trace>. +All of the following metrics have a recording level of debug, except for the record-e2e-latency-* metrics which have a recording level trace. 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: