Skip to content

Commit 97e1a89

Browse files
authored
Fix service wrapper init for metrics (#515)
1 parent 59d0734 commit 97e1a89

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

internal/internal_task_pollers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ func isClientSideError(err error) bool {
178178
func newWorkflowTaskPoller(taskHandler WorkflowTaskHandler, service workflowserviceclient.Interface,
179179
domain string, params workerExecutionParameters) *workflowTaskPoller {
180180
return &workflowTaskPoller{
181-
service: metrics.NewWorkflowServiceWrapper(service, params.MetricsScope),
181+
service: service,
182182
domain: domain,
183183
taskListName: params.TaskList,
184184
identity: params.Identity,
@@ -756,7 +756,7 @@ func newActivityTaskPoller(taskHandler ActivityTaskHandler, service workflowserv
756756
domain string, params workerExecutionParameters) *activityTaskPoller {
757757
return &activityTaskPoller{
758758
taskHandler: taskHandler,
759-
service: metrics.NewWorkflowServiceWrapper(service, params.MetricsScope),
759+
service: service,
760760
domain: domain,
761761
taskListName: params.TaskList,
762762
identity: params.Identity,

internal/internal_worker.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import (
4242
"go.uber.org/cadence/encoded"
4343
"go.uber.org/cadence/internal/common"
4444
"go.uber.org/cadence/internal/common/backoff"
45+
"go.uber.org/cadence/internal/common/metrics"
4546
"go.uber.org/zap"
4647
"go.uber.org/zap/zapcore"
4748
)
@@ -944,6 +945,7 @@ func newAggregatedWorker(
944945
zapcore.Field{Key: tagWorkerID, Type: zapcore.StringType, String: workerParams.Identity},
945946
)
946947
logger := workerParams.Logger
948+
service = metrics.NewWorkflowServiceWrapper(service, workerParams.MetricsScope)
947949

948950
processTestTags(&wOptions, &workerParams)
949951

0 commit comments

Comments
 (0)