ableegoldman commented on a change in pull request #8882:
URL: https://github.com/apache/kafka/pull/8882#discussion_r441781498



##########
File path: 
streams/src/main/java/org/apache/kafka/streams/processor/internals/metrics/TaskMetrics.java
##########
@@ -133,6 +142,25 @@ public static Sensor activeBufferedRecordsSensor(final 
String threadId,
         return sensor;
     }
 
+    public static Sensor e2ELatencySensor(final String threadId,
+                                          final String taskId,
+                                          final String processorNodeId,
+                                          final RecordingLevel recordingLevel,
+                                          final StreamsMetricsImpl 
streamsMetrics) {
+        final String sensorName = processorNodeId + "-" + RECORD_E2E_LATENCY;
+        final Sensor sensor = streamsMetrics.taskLevelSensor(threadId, taskId, 
sensorName, recordingLevel);
+        final Map<String, String> tagMap = 
streamsMetrics.nodeLevelTagMap(threadId, taskId, processorNodeId);
+        addMinAndMaxToSensor(
+            sensor,
+            PROCESSOR_NODE_LEVEL_GROUP,

Review comment:
       @vvcephei I'm not familiar enough with the metrics classification to 
know if this will be an issue or just an oddity, but we now have allegedly 
task-level metrics but with the processor-node-level tags/grouping. It's kind 
of a "task metric in implementation, processor node metric in interface" -- 
might be confusing for us but should be alright for users, yeah?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to