[Improvement][Metrics] Switch to use tags to indicate task / workflow execution status for metrics#11128
Conversation
… execution status for metrics (apache#10867)
Codecov Report
@@ Coverage Diff @@
## dev #11128 +/- ##
============================================
+ Coverage 40.37% 40.41% +0.04%
- Complexity 4873 4881 +8
============================================
Files 950 950
Lines 37187 37186 -1
Branches 4079 4078 -1
============================================
+ Hits 15014 15030 +16
+ Misses 20662 20632 -30
- Partials 1511 1524 +13
Help us with your feedback. Take ten seconds to tell us how you rate us. |
|
Kudos, SonarCloud Quality Gate passed! |
| private static Map<String, Counter> PROCESS_INSTANCE_COUNTERS = new HashMap<>(); | ||
|
|
||
| private static final Set<String> PROCESS_INSTANCE_STATES = ImmutableSet.of( | ||
| "submit", "timeout", "finish", "failover", "success", "fail", "stop"); |
There was a problem hiding this comment.
It's better to directly use ExecutionStatus.SUCCESS.getCode() to replace the success, and use
ProcessInstanceMetrics.incProcessInstanceByState(ExecutionStatus.SUCCESS.getCode());to increase the counter.
There was a problem hiding this comment.
Sure, thx for the suggestion. Will fix it.
There was a problem hiding this comment.
@ruanwenjun Hi I just checked this file
It seems those states in workflow metrics and task metrics are not fully covered by
ExecutionStatus e.g. failover and finish. What about keeping it this way for consistency and easier intelligibility?
There was a problem hiding this comment.
This is history problem, ExecutionStatus need to split into two class WorkflowExecutionStatus and TaskExecutionStatus, some states are only belong to workflow, and some states are only belong to task, and some status are deprecated.
There was a problem hiding this comment.
This is history problem,
ExecutionStatusneed to split into two classWorkflowExecutionStatusandTaskExecutionStatus, some states are only belong to workflow, and some states are only belong to task, and some status are deprecated.
@ruanwenjun Considering the legacy here, what should we do in this PR? Maybe I could open a new issue to split this ExecutionStatus ?
There was a problem hiding this comment.
I opened a new issue to split ExecutionStatus and remove deprecated states in it: #11145
There was a problem hiding this comment.
Another thing is if we use ExecutionStatus.SUCCESS.getCode() for tag, it might be a little bit unclear on the Grafana side as the tag value is integer in that case?








Purpose of the pull request
Brief change log
Verify this pull request