File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
service/history/replication Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 83
83
config * config.Config
84
84
metricsClient metrics.Client
85
85
metrics structured.Emitter
86
+ metricTags structured.Tags
86
87
logger log.Logger
87
88
taskExecutor TaskExecutor
88
89
hostRateLimiter quotas.Limiter
@@ -146,6 +147,7 @@ func NewTaskProcessor(
146
147
config : config ,
147
148
metricsClient : metricsClient ,
148
149
metrics : emitter ,
150
+ metricTags : structured.Tags {"target_cluster" : sourceCluster }, // looks backwards, but matches historical behavior
149
151
logger : shard .GetLogger ().WithTags (tag .SourceCluster (sourceCluster ), tag .ShardID (shardID )),
150
152
taskExecutor : taskExecutor ,
151
153
hostRateLimiter : taskFetcher .GetRateLimiter (),
@@ -482,11 +484,7 @@ func (p *taskProcessorImpl) processTaskOnce(replicationTask *types.ReplicationTa
482
484
domainName = name
483
485
mScope = mScope .Tagged (metrics .DomainTag (domainName ))
484
486
}
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 (
490
488
"operation" , structured .GetOperationString (scope ),
491
489
"domain" , domainName ,
492
490
)
You can’t perform that action at this time.
0 commit comments