EricGao888 commented on code in PR #13183:
URL: 
https://github.com/apache/dolphinscheduler/pull/13183#discussion_r1139679300


##########
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/metrics/TaskMetrics.java:
##########
@@ -83,11 +84,15 @@ public void incTaskDispatch() {
         taskDispatchCounter.increment();
     }
 
-    public void incTaskInstanceByState(final String state) {
-        if (taskInstanceCounters.get(state) == null) {
+    public void incTaskInstanceByState(final String state, String 
taskInstanceName) {
+        Counter.Builder builder = taskInstanceCountersBuild.get(state);
+        if (builder == null) {
             return;
         }
-        taskInstanceCounters.get(state).increment();
+        if 
(MasterConfigStatic.masterConfigStatic.isSupportTaskNameTagMetric()) {

Review Comment:
   
https://github.com/apache/dolphinscheduler/blob/1ac76e1cbbf25156f3b40dc5035ef7b15dfc9bdf/dolphinscheduler-dao/src/main/resources/sql/dolphinscheduler_mysql.sql#L468-L503
   
   `task name` is not identical, aggregating metrics by `task name` may lead to 
miscounting. `task definition id` is identical for task definition, however, I 
haven't found a way for users to get `task definition id` easily from web ui.  



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

Reply via email to