diff --git a/common/log/tag/tags.go b/common/log/tag/tags.go index 8d6a0bb8468..8c0010f2a38 100644 --- a/common/log/tag/tags.go +++ b/common/log/tag/tags.go @@ -24,6 +24,7 @@ import ( "fmt" "time" + "github.com/uber/cadence/.gen/go/shared" "github.com/uber/cadence/common/types" ) @@ -93,6 +94,11 @@ func WorkflowTimeoutType(timeoutType int64) Tag { return newInt64("wf-timeout-type", timeoutType) } +// ActivityTimeoutType returns tag for ActivityTimeoutType +func ActivityTimeoutType(timerType shared.TimeoutType) Tag { + return newStringTag("activity-timer-type", timerType.String()) +} + // WorkflowPollContextTimeout returns tag for WorkflowPollContextTimeout func WorkflowPollContextTimeout(pollContextTimeout time.Duration) Tag { return newDurationTag("wf-poll-context-timeout", pollContextTimeout) diff --git a/service/history/task/timer_active_task_executor.go b/service/history/task/timer_active_task_executor.go index f749c61705c..d1bc750e659 100644 --- a/service/history/task/timer_active_task_executor.go +++ b/service/history/task/timer_active_task_executor.go @@ -25,6 +25,7 @@ import ( "fmt" "time" + "github.com/uber/cadence/.gen/go/shared" "github.com/uber/cadence/common" "github.com/uber/cadence/common/backoff" "github.com/uber/cadence/common/log" @@ -430,6 +431,7 @@ Loop: tag.WorkflowRunID(task.GetRunID()), tag.ScheduleAttempt(task.ScheduleAttempt), tag.FailoverVersion(task.GetVersion()), + tag.ActivityTimeoutType(shared.TimeoutType(timerSequenceID.TimerType)), ) if _, err := mutableState.AddActivityTaskTimedOutEvent(