diff --git a/common/log/tag/tags.go b/common/log/tag/tags.go index f1967c23af3..3aa231a50a8 100644 --- a/common/log/tag/tags.go +++ b/common/log/tag/tags.go @@ -569,8 +569,8 @@ func Attempt(attempt int32) Tag { } // AttemptCount returns tag for AttemptCount -func AttemptCount(attemptCount int64) Tag { - return newInt64("attempt-count", attemptCount) +func AttemptCount(attemptCount int) Tag { + return newInt("attempt-count", attemptCount) } // AttemptStart returns tag for AttemptStart diff --git a/service/history/task/cross_cluster_task.go b/service/history/task/cross_cluster_task.go index 68db92f03a3..7e9c31142ee 100644 --- a/service/history/task/cross_cluster_task.go +++ b/service/history/task/cross_cluster_task.go @@ -359,7 +359,11 @@ func (t *crossClusterSourceTask) HandleErr( if attempt > t.maxRetryCount { t.scope.RecordTimer(metrics.TaskAttemptTimerPerDomain, time.Duration(attempt)) t.logger.Error("Critical error processing task, retrying.", - tag.Error(err), tag.OperationCritical, tag.TaskType(t.GetTaskType())) + tag.Error(err), + tag.OperationCritical, + tag.TaskType(t.GetTaskType()), + tag.AttemptCount(t.GetAttempt()), + ) } } }() diff --git a/service/history/task/task.go b/service/history/task/task.go index 7034d268fdb..3fbf9bc0460 100644 --- a/service/history/task/task.go +++ b/service/history/task/task.go @@ -240,6 +240,7 @@ func (t *taskImpl) HandleErr( tag.Error(err), tag.OperationCritical, tag.TaskType(t.GetTaskType()), + tag.AttemptCount(t.GetAttempt()), ) } }