From 348ad841d4d184acb9c4080bb738442c63a0310a Mon Sep 17 00:00:00 2001 From: Samar Abbas - Uber Date: Sat, 17 Jun 2017 10:21:19 -0700 Subject: [PATCH] Use the same value for shard tag of metric reporter (#245) * Use the same value for shard tag of metric reporter Emitting a shard tag for all metric becomes unmanageable when you run the server with large number of shards. Using a constant value for now. --- common/metrics/defs.go | 4 +++- service/history/execMgrFactory.go | 2 +- service/history/shardContext.go | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/common/metrics/defs.go b/common/metrics/defs.go index 5d77656ad8c..9ebe8510b4d 100644 --- a/common/metrics/defs.go +++ b/common/metrics/defs.go @@ -64,12 +64,14 @@ const ( const ( HostnameTagName = "hostname" OperationTagName = "operation" - ShardTagName = "shard" + // ShardTagName is temporary until we can get all metric data removed for the service + ShardTagName = "shard" ) // This package should hold all the metrics and tags for cadence const ( UnknownDirectoryTagValue = "Unknown" + AllShardsTagValue = "ALL" ) // Common service base metrics diff --git a/service/history/execMgrFactory.go b/service/history/execMgrFactory.go index 879cdc4fdda..79e4f5b49ec 100644 --- a/service/history/execMgrFactory.go +++ b/service/history/execMgrFactory.go @@ -61,7 +61,7 @@ func (factory *executionMgrFactory) CreateExecutionManager(shardID int) (persist } tags := map[string]string{ - metrics.ShardTagName: string(shardID), + metrics.ShardTagName: metrics.AllShardsTagValue, } return persistence.NewWorkflowExecutionPersistenceClient(mgr, factory.metricsClient.Tagged(tags)), nil } diff --git a/service/history/shardContext.go b/service/history/shardContext.go index 21c78822669..43d2bd33d77 100644 --- a/service/history/shardContext.go +++ b/service/history/shardContext.go @@ -449,7 +449,7 @@ func acquireShard(shardID int, shardManager persistence.ShardManager, historyMgr logging.TagHistoryShardID: shardID, }) tags := map[string]string{ - metrics.ShardTagName: string(shardID), + metrics.ShardTagName: metrics.AllShardsTagValue, } context.metricsClient = reporter.Tagged(tags)