diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java index b12401753936..0e3823aa14bb 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java @@ -664,10 +664,9 @@ public void run() } // Emit the processed bytes metric - IndexTaskUtils.setTaskDimensions(new ServiceMetricEvent.Builder(), task); - toolbox.getEmitter().emit( - ServiceMetricEvent.builder().setMetric("ingest/processed/bytes", bytesProcessed) - ); + final ServiceMetricEvent.Builder metricBuilder = new ServiceMetricEvent.Builder(); + IndexTaskUtils.setTaskDimensions(metricBuilder, task); + toolbox.getEmitter().emit(metricBuilder.setMetric("ingest/processed/bytes", bytesProcessed)); if (shouldProcess) { final List rows = parser.parse(record.getData(), isEndOfShard(record.getSequenceNumber()));