-
Notifications
You must be signed in to change notification settings - Fork 860
Make metric indexes unique #7237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,10 @@ type ( | |
ServiceIdx int | ||
) | ||
|
||
func (s scopeDefinition) GetOperationString() string { | ||
return s.operation | ||
} | ||
|
||
// MetricTypes which are supported | ||
const ( | ||
Counter MetricType = iota | ||
|
@@ -1070,7 +1074,7 @@ const ( | |
// -- Operation scopes for History service -- | ||
const ( | ||
// HistoryStartWorkflowExecutionScope tracks StartWorkflowExecution API calls received by service | ||
HistoryStartWorkflowExecutionScope = iota + NumCommonScopes | ||
HistoryStartWorkflowExecutionScope = iota + NumFrontendScopes | ||
// HistoryRecordActivityTaskHeartbeatScope tracks RecordActivityTaskHeartbeat API calls received by service | ||
HistoryRecordActivityTaskHeartbeatScope | ||
// HistoryRespondDecisionTaskCompletedScope tracks RespondDecisionTaskCompleted API calls received by service | ||
|
@@ -1358,7 +1362,7 @@ const ( | |
// -- Operation scopes for Matching service -- | ||
const ( | ||
// PollForDecisionTaskScope tracks PollForDecisionTask API calls received by service | ||
MatchingPollForDecisionTaskScope = iota + NumCommonScopes | ||
MatchingPollForDecisionTaskScope = iota + NumHistoryScopes | ||
// PollForActivityTaskScope tracks PollForActivityTask API calls received by service | ||
MatchingPollForActivityTaskScope | ||
// MatchingAddActivityTaskScope tracks AddActivityTask API calls received by service | ||
|
@@ -1394,7 +1398,7 @@ const ( | |
// -- Operation scopes for Worker service -- | ||
const ( | ||
// ReplicationScope is the scope used by all metric emitted by replicator | ||
ReplicatorScope = iota + NumCommonScopes | ||
ReplicatorScope = iota + NumMatchingScopes | ||
// DomainReplicationTaskScope is the scope used by domain task replication processing | ||
DomainReplicationTaskScope | ||
// ESProcessorScope is scope used by all metric emitted by esProcessor | ||
|
@@ -1442,7 +1446,7 @@ const ( | |
// -- Operation scopes for ShardDistributor service -- | ||
const ( | ||
// ShardDistributorGetShardOwnerScope tracks GetShardOwner API calls received by service | ||
ShardDistributorGetShardOwnerScope = iota + NumCommonScopes | ||
ShardDistributorGetShardOwnerScope = iota + NumWorkerScopes | ||
ShardDistributorHeartbeatScope | ||
ShardDistributorAssignLoopScope | ||
|
||
|
@@ -2404,6 +2408,8 @@ const ( | |
// cluster forwarding policy metrics | ||
ClusterForwardingPolicyRequests | ||
|
||
RingResolverError | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what's the deal with this one? did it get missed somewhere? |
||
|
||
NumCommonMetrics // Needs to be last on this list for iota numbering | ||
) | ||
|
||
|
@@ -2708,12 +2714,13 @@ const ( | |
VirtualQueueCountGauge | ||
VirtualQueuePausedGauge | ||
VirtualQueueRunningGauge | ||
|
||
NumHistoryMetrics | ||
) | ||
|
||
// Matching metrics enum | ||
const ( | ||
PollSuccessPerTaskListCounter = iota + NumCommonMetrics | ||
PollSuccessPerTaskListCounter = iota + NumHistoryMetrics | ||
PollTimeoutPerTaskListCounter | ||
PollSuccessWithSyncPerTaskListCounter | ||
LeaseRequestPerTaskListCounter | ||
|
@@ -2791,12 +2798,13 @@ const ( | |
IsolationGroupUpscale | ||
IsolationGroupDownscale | ||
PartitionDrained | ||
|
||
NumMatchingMetrics | ||
) | ||
|
||
// Worker metrics enum | ||
const ( | ||
ReplicatorMessages = iota + NumCommonMetrics | ||
ReplicatorMessages = iota + NumMatchingMetrics | ||
ReplicatorFailures | ||
ReplicatorMessagesDropped | ||
ReplicatorLatency | ||
|
@@ -2880,12 +2888,13 @@ const ( | |
DiagnosticsWorkflowStartedCount | ||
DiagnosticsWorkflowSuccess | ||
DiagnosticsWorkflowExecutionLatency | ||
|
||
NumWorkerMetrics | ||
) | ||
|
||
// ShardDistributor metrics enum | ||
const ( | ||
ShardDistributorRequests = iota + NumCommonMetrics | ||
ShardDistributorRequests = iota + NumWorkerMetrics | ||
ShardDistributorFailures | ||
ShardDistributorLatency | ||
ShardDistributorErrContextTimeoutCounter | ||
|
@@ -3188,6 +3197,8 @@ var MetricDefs = map[ServiceIdx]map[int]metricDefinition{ | |
ActiveClusterManagerLookupLatency: {metricName: "active_cluster_manager_lookup_latency", metricType: Histogram, buckets: ExponentialDurationBuckets}, | ||
|
||
ClusterForwardingPolicyRequests: {metricName: "cluster_forwarding_policy_requests", metricType: Counter}, | ||
|
||
RingResolverError: {metricName: "ring_resolver_error", metricType: Counter}, | ||
}, | ||
History: { | ||
TaskRequests: {metricName: "task_requests", metricType: Counter}, | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could remove this - it's mostly just prep-work since almost anything leaving the scope-index ints will need it.