suneet-s commented on code in PR #13760:
URL: https://github.com/apache/druid/pull/13760#discussion_r1097790760


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/TaskRealtimeMetricsMonitorBuilder.java:
##########
@@ -45,15 +47,20 @@ public static RealtimeMetricsMonitor build(Task task, 
FireDepartment fireDepartm
     );
   }
 
-  public static TaskRealtimeMetricsMonitor build(Task task, FireDepartment 
fireDepartment, RowIngestionMeters meters)
+  public static TaskRealtimeMetricsMonitor build(
+      Task task,
+      FireDepartment fireDepartment,
+      RowIngestionMeters meters
+  )
   {
     return new TaskRealtimeMetricsMonitor(
         fireDepartment,
         meters,
         ImmutableMap.of(
             DruidMetrics.TASK_ID, new String[]{task.getId()},
             DruidMetrics.TASK_TYPE, new String[]{task.getType()}
-        )
+            ),
+        (Map<String, Object>) task.getContext().get("metricMetadata")

Review Comment:
   this pattern is used in other places in the code, but if metricMetadata is 
not a map, I think this will crash. Should we introduce a new pattern where 
this just ignores the metricMetadata object if it is not a map or is failing 
loudly the desired behavior? 



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to