gianm commented on code in PR #13333:
URL: https://github.com/apache/druid/pull/13333#discussion_r1018749562


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/LocalTaskActionClient.java:
##########
@@ -72,14 +77,35 @@ public <RetType> RetType submit(TaskAction<RetType> 
taskAction)
 
     final long performStartTime = System.currentTimeMillis();
     final RetType result = taskAction.perform(task, toolbox);
-    emitTimerMetric("task/action/run/time", System.currentTimeMillis() - 
performStartTime);
+    emitTimerMetric("task/action/run/time", taskAction, 
System.currentTimeMillis() - performStartTime);
     return result;
   }
 
-  private void emitTimerMetric(final String metric, final long time)
+  private void emitTimerMetric(final String metric, final TaskAction<?> 
action, final long time)
   {
     final ServiceMetricEvent.Builder metricBuilder = 
ServiceMetricEvent.builder();
     IndexTaskUtils.setTaskDimensions(metricBuilder, task);
+    final String actionType = getActionType(toolbox.getJsonMapper(), action);
+    if (actionType != null) {
+      metricBuilder.setDimension("taskActionType", actionType);

Review Comment:
   I'm not sure really. I guess the generated JSON might be different, if the 
event builder doesn't omit null dimensions, but I'm not sure if that has 
meaningful effect.



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