Skip to content

Commit

Permalink
Add archiver metrics and logger tags (cadence-workflow#2242)
Browse files Browse the repository at this point in the history
  • Loading branch information
yycptt authored Jul 20, 2019
1 parent bad88bb commit f0de6d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/log/tag/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -721,9 +721,9 @@ func ArchivalUploadFailReason(uploadFailReason string) Tag {
return newStringTag("archival-upload-fail-reason", uploadFailReason)
}

// ArchivalDeleteBlobsFailReason returns tag for ArchivalDeleteBlobsFailReason
func ArchivalDeleteBlobsFailReason(deleteBlobsFailReason string) Tag {
return newStringTag("archival-delete-blobs-fail-reason", deleteBlobsFailReason)
// ArchivalCleanUpFailReason returns tag for ArchivalCleanUpFailReason
func ArchivalCleanUpFailReason(cleanUpFailReason string) Tag {
return newStringTag("archival-clean-up-fail-reason", cleanUpFailReason)
}

// ArchivalDeterministicConstructionCheckFailReason returns tag for ArchivalDeterministicConstructionCheckFailReason
Expand Down
4 changes: 4 additions & 0 deletions common/metrics/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1263,6 +1263,8 @@ const (
HistoryArchiverRunningBlobIntegrityCheckCount
HistoryArchiverBlobIntegrityCheckFailedCount
HistoryArchiverCouldNotRunBlobIntegrityCheckCount
HistoryArchiverUploadNonRetryableErrorCount
HistoryArchiverCleanupFailedCount

NumCommonMetrics // Needs to be last on this list for iota numbering
)
Expand Down Expand Up @@ -1524,6 +1526,8 @@ 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},
HistoryArchiverCouldNotRunBlobIntegrityCheckCount: {metricName: "history_archiver_could_not_run_blob_integrity_check", metricType: Counter},
HistoryArchiverUploadNonRetryableErrorCount: {metricName: "history_archiver_upload_non_retryable_error", metricType: Counter},
HistoryArchiverCleanupFailedCount: {metricName: "history_archiver_cleanup_failed", metricType: Counter},
},
Frontend: {},
History: {
Expand Down

0 comments on commit f0de6d1

Please sign in to comment.