Skip to content

Commit

Permalink
Add metric for delete inline count (uber#2361)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjdawson2016 authored Aug 8, 2019
1 parent 7d90437 commit 05bcf38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/metrics/defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,7 @@ const (
WorkflowCleanupDeleteCount
WorkflowCleanupArchiveCount
WorkflowCleanupNopCount
WorkflowCleanupDeleteHistoryInlineCount
WorkflowSuccessCount
WorkflowCancelCount
WorkflowFailedCount
Expand Down Expand Up @@ -1700,6 +1701,7 @@ var MetricDefs = map[ServiceIdx]map[int]metricDefinition{
WorkflowCleanupDeleteCount: {metricName: "workflow_cleanup_delete", metricType: Counter},
WorkflowCleanupArchiveCount: {metricName: "workflow_cleanup_archive", metricType: Counter},
WorkflowCleanupNopCount: {metricName: "workflow_cleanup_nop", metricType: Counter},
WorkflowCleanupDeleteHistoryInlineCount: {metricName: "workflow_cleanup_delete_history_inline", metricType: Counter},
WorkflowSuccessCount: {metricName: "workflow_success", metricType: Counter},
WorkflowCancelCount: {metricName: "workflow_cancel", metricType: Counter},
WorkflowFailedCount: {metricName: "workflow_failed", metricType: Counter},
Expand Down
1 change: 1 addition & 0 deletions service/history/timerQueueProcessorBase.go
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ func (t *timerQueueProcessorBase) archiveWorkflow(
return err
}
if resp.ArchivedInline {
t.metricsClient.IncCounter(metrics.HistoryProcessDeleteHistoryEventScope, metrics.WorkflowCleanupDeleteHistoryInlineCount)
if err := t.deleteWorkflowHistory(task, msBuilder); err != nil {
return err
}
Expand Down

0 comments on commit 05bcf38

Please sign in to comment.