| diff --git internal/internal_event_handlers.go internal/internal_event_handlers.go |
| index d201601..b79bb5a 100644 |
| --- internal/internal_event_handlers.go |
| +++ internal/internal_event_handlers.go |
| @@ -54,6 +54,7 @@ import ( |
| const ( |
| queryResultSizeLimit = 2000000 // 2MB |
| changeVersionSearchAttrSizeLimit = 2048 |
| + failureReasonPanic = "Panic" |
| ) |
| |
| // Assert that structs do indeed implement the interfaces |
| @@ -1088,7 +1089,7 @@ func (weh *workflowExecutionEventHandlerImpl) ProcessEvent( |
| } |
| defer func() { |
| if p := recover(); p != nil { |
| - weh.metricsHandler.Counter(metrics.WorkflowTaskExecutionFailureCounter).Inc(1) |
| + weh.metricsHandler.WithTags(metrics.WorkflowTaskFailedTags(failureReasonPanic)).Counter(metrics.WorkflowTaskExecutionFailureCounter).Inc(1) |
| topLine := fmt.Sprintf("process event for %s [panic]:", weh.workflowInfo.TaskQueueName) |
| st := getStackTraceRaw(topLine, 7, 0) |
| weh.Complete(nil, newWorkflowPanicError(p, st)) |
| @@ -1268,7 +1269,7 @@ func (weh *workflowExecutionEventHandlerImpl) ProcessMessage( |
| ) error { |
| defer func() { |
| if p := recover(); p != nil { |
| - weh.metricsHandler.Counter(metrics.WorkflowTaskExecutionFailureCounter).Inc(1) |
| + weh.metricsHandler.WithTags(metrics.WorkflowTaskFailedTags(failureReasonPanic)).Counter(metrics.WorkflowTaskExecutionFailureCounter).Inc(1) |
| topLine := fmt.Sprintf("process message for %s [panic]:", weh.workflowInfo.TaskQueueName) |
| st := getStackTraceRaw(topLine, 7, 0) |
| weh.Complete(nil, newWorkflowPanicError(p, st)) |