Skip to content

Commit 4890326

Browse files
authored
Add tag ClientImpl to all metrics (#482)
1 parent b53c938 commit 4890326

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

internal/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ func NewClient(service workflowserviceclient.Interface, domain string, options *
334334
if options != nil {
335335
metricScope = options.MetricsScope
336336
}
337-
metricScope = tagScope(metricScope, tagDomain, domain)
337+
metricScope = tagScope(metricScope, tagDomain, domain, clientImplHeaderName, clientImplHeaderValue)
338338
var dataConverter encoded.DataConverter
339339
if options != nil && options.DataConverter != nil {
340340
dataConverter = options.DataConverter
@@ -362,7 +362,7 @@ func NewDomainClient(service workflowserviceclient.Interface, options *ClientOpt
362362
if options != nil {
363363
metricScope = options.MetricsScope
364364
}
365-
metricScope = tagScope(metricScope, tagDomain, "domain-client")
365+
metricScope = tagScope(metricScope, tagDomain, "domain-client", clientImplHeaderName, clientImplHeaderValue)
366366
return &domainClient{
367367
workflowService: metrics.NewWorkflowServiceWrapper(service, metricScope),
368368
metricsScope: metricScope,

internal/internal_worker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ func newAggregatedWorker(
936936
}
937937

938938
ensureRequiredParams(&workerParams)
939-
workerParams.MetricsScope = tagScope(workerParams.MetricsScope, tagDomain, domain, tagTaskList, taskList)
939+
workerParams.MetricsScope = tagScope(workerParams.MetricsScope, tagDomain, domain, tagTaskList, taskList, clientImplHeaderName, clientImplHeaderValue)
940940
workerParams.Logger = workerParams.Logger.With(
941941
zapcore.Field{Key: tagDomain, Type: zapcore.StringType, String: domain},
942942
zapcore.Field{Key: tagTaskList, Type: zapcore.StringType, String: taskList},

0 commit comments

Comments
 (0)