diff --git a/service/history/execution/context.go b/service/history/execution/context.go index e15e585499d..1ca54231927 100644 --- a/service/history/execution/context.go +++ b/service/history/execution/context.go @@ -799,8 +799,9 @@ func (c *contextImpl) UpdateWorkflowExecutionWithNew( // emit workflow completion stats if any if currentWorkflow.ExecutionInfo.State == persistence.WorkflowStateCompleted { if event, err := c.mutableState.GetCompletionEvent(ctx); err == nil { + workflowType := currentWorkflow.ExecutionInfo.WorkflowTypeName taskList := currentWorkflow.ExecutionInfo.TaskList - emitWorkflowCompletionStats(c.metricsClient, domainName, taskList, event) + emitWorkflowCompletionStats(c.metricsClient, domainName, workflowType, taskList, event) } } diff --git a/service/history/execution/context_util.go b/service/history/execution/context_util.go index 0591f7ef30f..596c86517e8 100644 --- a/service/history/execution/context_util.go +++ b/service/history/execution/context_util.go @@ -110,6 +110,7 @@ func emitSessionUpdateStats( func emitWorkflowCompletionStats( metricsClient metrics.Client, domainName string, + workflowType string, taskList string, event *workflow.HistoryEvent, ) { @@ -121,6 +122,7 @@ func emitWorkflowCompletionStats( scope := metricsClient.Scope( metrics.WorkflowCompletionStatsScope, metrics.DomainTag(domainName), + metrics.WorkflowTypeTag(workflowType), metrics.TaskListTag(taskList), )