Skip to content

Commit

Permalink
Add metrics for visibility archiver (cadence-workflow#2629)
Browse files Browse the repository at this point in the history
  • Loading branch information
yycptt authored Oct 5, 2019
1 parent 62eacc8 commit 9ac2bf1
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions common/metrics/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,8 @@ const (

// HistoryArchiverScope is used by history archivers
HistoryArchiverScope
// VisibilityArchiverScope is used by visibility archivers
VisibilityArchiverScope

// The following metrics are only used by internal archiver implemention.
// TODO: move them to internal repo once cadence plugin model is in place.
Expand Down Expand Up @@ -1132,7 +1134,8 @@ var ScopeDefs = map[ServiceIdx]map[int]scopeDefinition{
ElasticsearchDeleteWorkflowExecutionsScope: {operation: "DeleteWorkflowExecution"},
SequentialTaskProcessingScope: {operation: "SequentialTaskProcessing"},

HistoryArchiverScope: {operation: "HistoryArchiver"},
HistoryArchiverScope: {operation: "HistoryArchiver"},
VisibilityArchiverScope: {operation: "VisibilityArchiver"},

BlobstoreClientUploadScope: {operation: "BlobstoreClientUpload", tags: map[string]string{CadenceRoleTagName: BlobstoreRoleTagValue}},
BlobstoreClientDownloadScope: {operation: "BlobstoreClientDownload", tags: map[string]string{CadenceRoleTagName: BlobstoreRoleTagValue}},
Expand Down Expand Up @@ -1391,7 +1394,7 @@ const (
HistoryArchiverTotalUploadSize
HistoryArchiverHistorySize

// The following metrics are only used by internal archiver implemention.
// The following metrics are only used by internal history archiver implemention.
// TODO: move them to internal repo once cadence plugin model is in place.
HistoryArchiverBlobExistsCount
HistoryArchiverBlobSize
Expand All @@ -1401,6 +1404,10 @@ const (
HistoryArchiverBlobIntegrityCheckFailedCount
HistoryArchiverDuplicateArchivalsCount

VisibilityArchiverArchiveNonRetryableErrorCount
VisibilityArchiverArchiveTransientErrorCount
VisibilityArchiveSuccessCount

MatchingClientForwardedCounter
MatchingClientInvalidTaskListName

Expand Down Expand Up @@ -1537,8 +1544,6 @@ const (
ReplicationTasksFetched
ReplicationTasksReturned
GetReplicationMessagesForShardLatency
ArchiveVisibilityAttemptCount
ArchiveVisibilityFailedCount
EventReapplySkippedCount

NumHistoryMetrics
Expand Down Expand Up @@ -1707,6 +1712,9 @@ var MetricDefs = map[ServiceIdx]map[int]metricDefinition{
HistoryArchiverRunningBlobIntegrityCheckCount: {metricName: "history_archiver_running_blob_integrity_check", metricType: Counter},
HistoryArchiverBlobIntegrityCheckFailedCount: {metricName: "history_archiver_blob_integrity_check_failed", metricType: Counter},
HistoryArchiverDuplicateArchivalsCount: {metricName: "history_archiver_duplicate_archivals", metricType: Counter},
VisibilityArchiverArchiveNonRetryableErrorCount: {metricName: "visibility_archiver_archive_non_retryable_error", metricType: Counter},
VisibilityArchiverArchiveTransientErrorCount: {metricName: "visibility_archiver_archive_transient_error", metricType: Counter},
VisibilityArchiveSuccessCount: {metricName: "visibility_archiver_archive_success", metricType: Counter},
MatchingClientForwardedCounter: {metricName: "forwarded", metricType: Counter},
MatchingClientInvalidTaskListName: {metricName: "invalid_task_list_name", metricType: Counter},
},
Expand Down Expand Up @@ -1839,8 +1847,6 @@ var MetricDefs = map[ServiceIdx]map[int]metricDefinition{
ReplicationTasksFetched: {metricName: "replication_tasks_fetched", metricType: Timer},
ReplicationTasksReturned: {metricName: "replication_tasks_returned", metricType: Timer},
GetReplicationMessagesForShardLatency: {metricName: "get_replication_messages_for_shard", metricType: Timer},
ArchiveVisibilityAttemptCount: {metricName: "archive_visibility_attempt_count", metricType: Counter},
ArchiveVisibilityFailedCount: {metricName: "archive_visibility_failed_count", metricType: Counter},
EventReapplySkippedCount: {metricName: "event_reapply_skipped_count", metricType: Counter},
},
Matching: {
Expand Down

0 comments on commit 9ac2bf1

Please sign in to comment.