You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "kfaraz (via GitHub)" <gi...@apache.org> on 2023/06/14 02:35:31 UTC

[GitHub] [druid] kfaraz commented on a diff in pull request #14402: Add groupId to metrics

kfaraz commented on code in PR #14402:
URL: https://github.com/apache/druid/pull/14402#discussion_r1228902369


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/IndexTaskUtils.java:
##########
@@ -129,6 +130,7 @@ public static void setTaskDimensions(final ServiceMetricEvent.Builder metricBuil
         DruidMetrics.TAGS,
         task.<Map<String, Object>>getContextValue(DruidMetrics.TAGS)
     );
+    metricBuilder.setDimensionIfNotNull(DruidMetrics.GROUP_ID, task.getGroupId());
   }
 
   public static void setTaskStatusDimensions(

Review Comment:
   This method is currently being used in just one place, while emitting the metric `task/run/time`.
   You can add the `groupId` dimension to this one as well, just in case you want to group this metric on `groupId`. 
   
   To set the groupId though, you would need to pass the `Task` object to this method, because `TaskStatus` does not seem to have a `groupId` field.



-- 
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: commits-unsubscribe@druid.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org