diff --git a/common/persistence/visibilitySamplingClient.go b/common/persistence/visibilitySamplingClient.go index d1c3fee741b..1f43bf8467e 100644 --- a/common/persistence/visibilitySamplingClient.go +++ b/common/persistence/visibilitySamplingClient.go @@ -105,9 +105,9 @@ func (p *visibilitySamplingClient) RecordWorkflowExecutionStarted(request *Recor p.logger.Info("Request for open workflow is sampled", tag.WorkflowDomainID(domain), - tag.WorkflowType(request.Execution.GetWorkflowId()), - tag.WorkflowID(request.Execution.GetRunId()), - tag.WorkflowRunID(request.WorkflowTypeName), + tag.WorkflowType(request.WorkflowTypeName), + tag.WorkflowID(request.Execution.GetWorkflowId()), + tag.WorkflowRunID(request.Execution.GetRunId()), ) p.metricClient.IncCounter(metrics.PersistenceRecordWorkflowExecutionStartedScope, metrics.PersistenceSampledCounter) return nil @@ -124,9 +124,9 @@ func (p *visibilitySamplingClient) RecordWorkflowExecutionClosed(request *Record p.logger.Info("Request for closed workflow is sampled", tag.WorkflowDomainID(domain), - tag.WorkflowType(request.Execution.GetWorkflowId()), - tag.WorkflowID(request.Execution.GetRunId()), - tag.WorkflowRunID(request.WorkflowTypeName), + tag.WorkflowType(request.WorkflowTypeName), + tag.WorkflowID(request.Execution.GetWorkflowId()), + tag.WorkflowRunID(request.Execution.GetRunId()), ) p.metricClient.IncCounter(metrics.PersistenceRecordWorkflowExecutionClosedScope, metrics.PersistenceSampledCounter) return nil diff --git a/service/history/queueProcessor.go b/service/history/queueProcessor.go index 70ffb39a96f..43ebb536599 100644 --- a/service/history/queueProcessor.go +++ b/service/history/queueProcessor.go @@ -425,15 +425,15 @@ func (p *queueProcessorBase) initializeLoggerForTask(task queueTaskInfo) log.Log switch task := task.(type) { case *persistence.TransferTaskInfo: logger = logger.WithTags( - tag.WorkflowID(task.RunID), - tag.WorkflowRunID(task.WorkflowID), + tag.WorkflowID(task.WorkflowID), + tag.WorkflowRunID(task.RunID), tag.WorkflowDomainID(task.DomainID)) logger.Debug("Processing transfer task") case *persistence.ReplicationTaskInfo: logger = logger.WithTags( - tag.WorkflowID(task.RunID), - tag.WorkflowRunID(task.WorkflowID), + tag.WorkflowID(task.WorkflowID), + tag.WorkflowRunID(task.RunID), tag.WorkflowDomainID(task.DomainID)) logger.Debug("Processing replication task") diff --git a/service/history/timerQueueProcessorBase.go b/service/history/timerQueueProcessorBase.go index 363703e907b..64e5cee54b2 100644 --- a/service/history/timerQueueProcessorBase.go +++ b/service/history/timerQueueProcessorBase.go @@ -539,8 +539,8 @@ func (t *timerQueueProcessorBase) ackTaskOnce(task *persistence.TimerTaskInfo, s func (t *timerQueueProcessorBase) initializeLoggerForTask(task *persistence.TimerTaskInfo) log.Logger { logger := t.logger.WithTags( - tag.WorkflowID(task.RunID), - tag.WorkflowRunID(task.WorkflowID), + tag.WorkflowID(task.WorkflowID), + tag.WorkflowRunID(task.RunID), tag.WorkflowDomainID(task.DomainID), tag.ShardID(t.shard.GetShardID()), tag.TaskID(task.GetTaskID()), @@ -644,8 +644,8 @@ func (t *timerQueueProcessorBase) archiveWorkflow(task *persistence.TimerTaskInf // send signal before deleting mutable state to make sure archival is idempotent if err := t.historyService.archivalClient.Archive(req); err != nil { t.logger.Error("failed to initiate archival", tag.Error(err), - tag.WorkflowID(task.RunID), - tag.WorkflowRunID(task.WorkflowID), + tag.WorkflowID(task.WorkflowID), + tag.WorkflowRunID(task.RunID), tag.WorkflowDomainID(task.DomainID), tag.ShardID(t.shard.GetShardID()), tag.TaskID(task.GetTaskID()), @@ -682,8 +682,8 @@ func (t *timerQueueProcessorBase) deleteWorkflowHistory(task *persistence.TimerT domainID, workflowExecution := t.getDomainIDAndWorkflowExecution(task) op := func() error { if msBuilder.GetEventStoreVersion() == persistence.EventStoreVersionV2 { - logger := t.logger.WithTags(tag.WorkflowID(task.RunID), - tag.WorkflowRunID(task.WorkflowID), + logger := t.logger.WithTags(tag.WorkflowID(task.WorkflowID), + tag.WorkflowRunID(task.RunID), tag.WorkflowDomainID(task.DomainID), tag.ShardID(t.shard.GetShardID()), tag.TaskID(task.GetTaskID()), diff --git a/service/history/timerQueueStandbyProcessor.go b/service/history/timerQueueStandbyProcessor.go index a430bbcd075..cf7867b0eea 100644 --- a/service/history/timerQueueStandbyProcessor.go +++ b/service/history/timerQueueStandbyProcessor.go @@ -528,8 +528,8 @@ func (t *timerQueueStandbyProcessorImpl) fetchHistoryFromRemote(timerTask *persi ) if err != nil { t.logger.Error("Error re-replicating history from remote.", - tag.WorkflowID(timerTask.RunID), - tag.WorkflowRunID(timerTask.WorkflowID), + tag.WorkflowID(timerTask.WorkflowID), + tag.WorkflowRunID(timerTask.RunID), tag.WorkflowDomainID(timerTask.DomainID), tag.ShardID(t.shard.GetShardID()), tag.WorkflowNextEventID(nextEventID), diff --git a/service/history/workflowExecutionContext.go b/service/history/workflowExecutionContext.go index 4893c6b5d00..fd3b6119b9f 100644 --- a/service/history/workflowExecutionContext.go +++ b/service/history/workflowExecutionContext.go @@ -100,9 +100,9 @@ func newWorkflowExecutionContext( logger log.Logger, ) *workflowExecutionContextImpl { lg := logger.WithTags( - tag.WorkflowID(domainID), - tag.WorkflowRunID(execution.GetWorkflowId()), - tag.WorkflowDomainID(execution.GetRunId())) + tag.WorkflowID(execution.GetWorkflowId()), + tag.WorkflowRunID(execution.GetRunId()), + tag.WorkflowDomainID(domainID)) return &workflowExecutionContextImpl{ domainID: domainID,