Skip to content

Commit 56257ad

Browse files
committed
passing keys through
1 parent 59da69f commit 56257ad

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

service/history/replication/task_processor.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ type (
8383
config *config.Config
8484
metricsClient metrics.Client
8585
metrics structured.Emitter
86+
metricTags structured.Tags
8687
logger log.Logger
8788
taskExecutor TaskExecutor
8889
hostRateLimiter quotas.Limiter
@@ -146,6 +147,7 @@ func NewTaskProcessor(
146147
config: config,
147148
metricsClient: metricsClient,
148149
metrics: emitter,
150+
metricTags: structured.Tags{"target_cluster": sourceCluster}, // looks backwards, but matches historical behavior
149151
logger: shard.GetLogger().WithTags(tag.SourceCluster(sourceCluster), tag.ShardID(shardID)),
150152
taskExecutor: taskExecutor,
151153
hostRateLimiter: taskFetcher.GetRateLimiter(),
@@ -482,11 +484,7 @@ func (p *taskProcessorImpl) processTaskOnce(replicationTask *types.ReplicationTa
482484
domainName = name
483485
mScope = mScope.Tagged(metrics.DomainTag(domainName))
484486
}
485-
// TODO: move source cluster to constructor
486-
baseTags := structured.Tags{
487-
"target_cluster": p.sourceCluster, // looks backwards, but matches historical behavior
488-
}
489-
tags := baseTags.With(
487+
tags := p.metricTags.With(
490488
"operation", structured.GetOperationString(scope),
491489
"domain", domainName,
492490
)

0 commit comments

Comments
 (0)