@@ -53,6 +53,10 @@ type (
5353	ServiceIdx  int 
5454)
5555
56+ func  (s  scopeDefinition ) GetOperationString () string  {
57+ 	return  s .operation 
58+ }
59+ 
5660// MetricTypes which are supported 
5761const  (
5862	Counter  MetricType  =  iota 
@@ -1070,7 +1074,7 @@ const (
10701074// -- Operation scopes for History service -- 
10711075const  (
10721076	// HistoryStartWorkflowExecutionScope tracks StartWorkflowExecution API calls received by service 
1073- 	HistoryStartWorkflowExecutionScope  =  iota  +  NumCommonScopes 
1077+ 	HistoryStartWorkflowExecutionScope  =  iota  +  NumFrontendScopes 
10741078	// HistoryRecordActivityTaskHeartbeatScope tracks RecordActivityTaskHeartbeat API calls received by service 
10751079	HistoryRecordActivityTaskHeartbeatScope 
10761080	// HistoryRespondDecisionTaskCompletedScope tracks RespondDecisionTaskCompleted API calls received by service 
@@ -1358,7 +1362,7 @@ const (
13581362// -- Operation scopes for Matching service -- 
13591363const  (
13601364	// PollForDecisionTaskScope tracks PollForDecisionTask API calls received by service 
1361- 	MatchingPollForDecisionTaskScope  =  iota  +  NumCommonScopes 
1365+ 	MatchingPollForDecisionTaskScope  =  iota  +  NumHistoryScopes 
13621366	// PollForActivityTaskScope tracks PollForActivityTask API calls received by service 
13631367	MatchingPollForActivityTaskScope 
13641368	// MatchingAddActivityTaskScope tracks AddActivityTask API calls received by service 
@@ -1394,7 +1398,7 @@ const (
13941398// -- Operation scopes for Worker service -- 
13951399const  (
13961400	// ReplicationScope is the scope used by all metric emitted by replicator 
1397- 	ReplicatorScope  =  iota  +  NumCommonScopes 
1401+ 	ReplicatorScope  =  iota  +  NumMatchingScopes 
13981402	// DomainReplicationTaskScope is the scope used by domain task replication processing 
13991403	DomainReplicationTaskScope 
14001404	// ESProcessorScope is scope used by all metric emitted by esProcessor 
@@ -1442,7 +1446,7 @@ const (
14421446// -- Operation scopes for ShardDistributor service -- 
14431447const  (
14441448	// ShardDistributorGetShardOwnerScope tracks GetShardOwner API calls received by service 
1445- 	ShardDistributorGetShardOwnerScope  =  iota  +  NumCommonScopes 
1449+ 	ShardDistributorGetShardOwnerScope  =  iota  +  NumWorkerScopes 
14461450	ShardDistributorHeartbeatScope 
14471451	ShardDistributorAssignLoopScope 
14481452
@@ -2404,6 +2408,8 @@ const (
24042408	// cluster forwarding policy metrics 
24052409	ClusterForwardingPolicyRequests 
24062410
2411+ 	RingResolverError 
2412+ 
24072413	NumCommonMetrics  // Needs to be last on this list for iota numbering 
24082414)
24092415
@@ -2708,12 +2714,13 @@ const (
27082714	VirtualQueueCountGauge 
27092715	VirtualQueuePausedGauge 
27102716	VirtualQueueRunningGauge 
2717+ 
27112718	NumHistoryMetrics 
27122719)
27132720
27142721// Matching metrics enum 
27152722const  (
2716- 	PollSuccessPerTaskListCounter  =  iota  +  NumCommonMetrics 
2723+ 	PollSuccessPerTaskListCounter  =  iota  +  NumHistoryMetrics 
27172724	PollTimeoutPerTaskListCounter 
27182725	PollSuccessWithSyncPerTaskListCounter 
27192726	LeaseRequestPerTaskListCounter 
@@ -2791,12 +2798,13 @@ const (
27912798	IsolationGroupUpscale 
27922799	IsolationGroupDownscale 
27932800	PartitionDrained 
2801+ 
27942802	NumMatchingMetrics 
27952803)
27962804
27972805// Worker metrics enum 
27982806const  (
2799- 	ReplicatorMessages  =  iota  +  NumCommonMetrics 
2807+ 	ReplicatorMessages  =  iota  +  NumMatchingMetrics 
28002808	ReplicatorFailures 
28012809	ReplicatorMessagesDropped 
28022810	ReplicatorLatency 
@@ -2880,12 +2888,13 @@ const (
28802888	DiagnosticsWorkflowStartedCount 
28812889	DiagnosticsWorkflowSuccess 
28822890	DiagnosticsWorkflowExecutionLatency 
2891+ 
28832892	NumWorkerMetrics 
28842893)
28852894
28862895// ShardDistributor metrics enum 
28872896const  (
2888- 	ShardDistributorRequests  =  iota  +  NumCommonMetrics 
2897+ 	ShardDistributorRequests  =  iota  +  NumWorkerMetrics 
28892898	ShardDistributorFailures 
28902899	ShardDistributorLatency 
28912900	ShardDistributorErrContextTimeoutCounter 
@@ -3188,6 +3197,8 @@ var MetricDefs = map[ServiceIdx]map[int]metricDefinition{
31883197		ActiveClusterManagerLookupLatency :      {metricName : "active_cluster_manager_lookup_latency" , metricType : Histogram , buckets : ExponentialDurationBuckets },
31893198
31903199		ClusterForwardingPolicyRequests : {metricName : "cluster_forwarding_policy_requests" , metricType : Counter },
3200+ 
3201+ 		RingResolverError : {metricName : "ring_resolver_error" , metricType : Counter },
31913202	},
31923203	History : {
31933204		TaskRequests :             {metricName : "task_requests" , metricType : Counter },
0 commit comments