Skip to content

Commit

Permalink
Add metrics scopes for the archival queue
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSnowden committed Dec 1, 2022
1 parent 79a572d commit bbd2353
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/metrics/metric_defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,10 @@ const (
PersistenceRangeCompleteVisibilityTasksScope = "RangeCompleteVisibilityTasks"
// PersistenceGetReplicationTaskScope tracks GetReplicationTask calls made by service to persistence layer
PersistenceGetReplicationTaskScope = "GetReplicationTask"
// PersistenceGetArchivalTaskScope tracks GetArchivalTask calls made by service to persistence layer
PersistenceGetArchivalTaskScope = "GetArchivalTask"
// PersistenceGetArchivalTasksScope tracks GetArchivalTasks calls made by service to persistence layer
PersistenceGetArchivalTasksScope = "GetArchivalTasks"
// PersistenceGetReplicationTasksScope tracks GetReplicationTasks calls made by service to persistence layer
PersistenceGetReplicationTasksScope = "GetReplicationTasks"
// PersistenceCompleteReplicationTaskScope tracks CompleteReplicationTasks calls made by service to persistence layer
Expand Down
4 changes: 4 additions & 0 deletions common/persistence/persistenceMetricClients.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ func (p *executionPersistenceClient) GetHistoryTask(
operation = metrics.PersistenceGetVisibilityTaskScope
case tasks.CategoryIDReplication:
operation = metrics.PersistenceGetReplicationTaskScope
case tasks.CategoryIDArchival:
operation = metrics.PersistenceGetArchivalTaskScope
default:
return nil, serviceerror.NewInternal(fmt.Sprintf("unknown task category type: %v", request.TaskCategory))
}
Expand All @@ -357,6 +359,8 @@ func (p *executionPersistenceClient) GetHistoryTasks(
operation = metrics.PersistenceGetVisibilityTasksScope
case tasks.CategoryIDReplication:
operation = metrics.PersistenceGetReplicationTasksScope
case tasks.CategoryIDArchival:
operation = metrics.PersistenceGetArchivalTasksScope
default:
return nil, serviceerror.NewInternal(fmt.Sprintf("unknown task category type: %v", request.TaskCategory))
}
Expand Down

0 comments on commit bbd2353

Please sign in to comment.