Skip to content

Commit

Permalink
Add metrics to AccessControlledHandler (#3145)
Browse files Browse the repository at this point in the history
  • Loading branch information
vancexu authored Mar 27, 2020
1 parent a933ae0 commit 882f680
Show file tree
Hide file tree
Showing 5 changed files with 240 additions and 37 deletions.
7 changes: 7 additions & 0 deletions common/metrics/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,8 @@ const (
CadenceErrClientVersionNotSupportedCounter
CadenceErrIncompleteHistoryCounter
CadenceErrNonDeterministicCounter
CadenceErrUnauthorizedCounter
CadenceErrAuthorizeFailedCounter
PersistenceRequests
PersistenceFailures
PersistenceLatency
Expand All @@ -1544,6 +1546,8 @@ const (
CadenceDcRedirectionClientFailures
CadenceDcRedirectionClientLatency

CadenceAuthorizationLatency

DomainCachePrepareCallbacksLatency
DomainCacheCallbacksLatency

Expand Down Expand Up @@ -1890,6 +1894,8 @@ var MetricDefs = map[ServiceIdx]map[int]metricDefinition{
CadenceErrClientVersionNotSupportedCounter: {metricName: "cadence_errors_client_version_not_supported", metricType: Counter},
CadenceErrIncompleteHistoryCounter: {metricName: "cadence_errors_incomplete_history", metricType: Counter},
CadenceErrNonDeterministicCounter: {metricName: "cadence_errors_nondeterministic", metricType: Counter},
CadenceErrUnauthorizedCounter: {metricName: "cadence_errors_unauthorized", metricType: Counter},
CadenceErrAuthorizeFailedCounter: {metricName: "cadence_errors_authorize_failed", metricType: Counter},
PersistenceRequests: {metricName: "persistence_requests", metricType: Counter},
PersistenceFailures: {metricName: "persistence_errors", metricType: Counter},
PersistenceLatency: {metricName: "persistence_latency", metricType: Timer},
Expand All @@ -1910,6 +1916,7 @@ var MetricDefs = map[ServiceIdx]map[int]metricDefinition{
CadenceDcRedirectionClientRequests: {metricName: "cadence_client_requests_redirection", metricType: Counter},
CadenceDcRedirectionClientFailures: {metricName: "cadence_client_errors_redirection", metricType: Counter},
CadenceDcRedirectionClientLatency: {metricName: "cadence_client_latency_redirection", metricType: Timer},
CadenceAuthorizationLatency: {metricName: "cadence_authorization_latency", metricType: Timer},
DomainCachePrepareCallbacksLatency: {metricName: "domain_cache_prepare_callbacks_latency", metricType: Timer},
DomainCacheCallbacksLatency: {metricName: "domain_cache_callbacks_latency", metricType: Timer},
HistorySize: {metricName: "history_size", metricType: Timer},
Expand Down
Loading

0 comments on commit 882f680

Please sign in to comment.