File tree 3 files changed +7
-3
lines changed
3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1170,7 +1170,7 @@ func (weh *workflowExecutionEventHandlerImpl) ProcessEvent(
1170
1170
}
1171
1171
defer func () {
1172
1172
if p := recover (); p != nil {
1173
- weh .metricsHandler . Counter ( metrics . WorkflowTaskExecutionFailureCounter ). Inc ( 1 )
1173
+ incrementWorkflowTaskFailureCounter ( weh .metricsHandler , "NonDeterminismError" )
1174
1174
topLine := fmt .Sprintf ("process event for %s [panic]:" , weh .workflowInfo .TaskQueueName )
1175
1175
st := getStackTraceRaw (topLine , 7 , 0 )
1176
1176
weh .Complete (nil , newWorkflowPanicError (p , st ))
@@ -1373,7 +1373,7 @@ func (weh *workflowExecutionEventHandlerImpl) ProcessMessage(
1373
1373
) error {
1374
1374
defer func () {
1375
1375
if p := recover (); p != nil {
1376
- weh .metricsHandler . Counter ( metrics . WorkflowTaskExecutionFailureCounter ). Inc ( 1 )
1376
+ incrementWorkflowTaskFailureCounter ( weh .metricsHandler , "NonDeterminismError" )
1377
1377
topLine := fmt .Sprintf ("process message for %s [panic]:" , weh .workflowInfo .TaskQueueName )
1378
1378
st := getStackTraceRaw (topLine , 7 , 0 )
1379
1379
weh .Complete (nil , newWorkflowPanicError (p , st ))
Original file line number Diff line number Diff line change @@ -471,7 +471,7 @@ func (wtp *workflowTaskPoller) RespondTaskCompletedWithMetrics(
471
471
if failWorkflowTask .Cause == enumspb .WORKFLOW_TASK_FAILED_CAUSE_NON_DETERMINISTIC_ERROR {
472
472
failureReason = "NonDeterminismError"
473
473
}
474
- metricsHandler . WithTags ( metrics . WorkflowTaskFailedTags ( failureReason )). Counter ( metrics . WorkflowTaskExecutionFailureCounter ). Inc ( 1 )
474
+ incrementWorkflowTaskFailureCounter ( metricsHandler , failureReason )
475
475
completedRequest = failWorkflowTask
476
476
}
477
477
Original file line number Diff line number Diff line change @@ -1960,3 +1960,7 @@ func (s *semaphoreImpl) Release(n int64) {
1960
1960
panic ("Semaphore.Release() released more than held" )
1961
1961
}
1962
1962
}
1963
+
1964
+ func incrementWorkflowTaskFailureCounter (metricsHandler metrics.Handler , failureReason string ) {
1965
+ metricsHandler .WithTags (metrics .WorkflowTaskFailedTags (failureReason )).Counter (metrics .WorkflowTaskExecutionFailureCounter ).Inc (1 )
1966
+ }
You can’t perform that action at this time.
0 commit comments