Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics scopes for the archival queue #3566

Merged
merged 1 commit into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions common/metrics/metric_defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,14 @@ 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"
// PersistenceCompleteArchivalTaskScope tracks CompleteArchivalTasks calls made by service to persistence layer
PersistenceCompleteArchivalTaskScope = "CompleteArchivalTask"
// PersistenceRangeCompleteArchivalTasksScope tracks CompleteArchivalTasks calls made by service to persistence layer
PersistenceRangeCompleteArchivalTasksScope = "RangeCompleteArchivalTasks"
// PersistenceGetReplicationTasksScope tracks GetReplicationTasks calls made by service to persistence layer
PersistenceGetReplicationTasksScope = "GetReplicationTasks"
// PersistenceCompleteReplicationTaskScope tracks CompleteReplicationTasks calls made by service to persistence layer
Expand Down
8 changes: 8 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 All @@ -383,6 +387,8 @@ func (p *executionPersistenceClient) CompleteHistoryTask(
operation = metrics.PersistenceCompleteVisibilityTaskScope
case tasks.CategoryIDReplication:
operation = metrics.PersistenceCompleteReplicationTaskScope
case tasks.CategoryIDArchival:
operation = metrics.PersistenceCompleteArchivalTaskScope
default:
return serviceerror.NewInternal(fmt.Sprintf("unknown task category type: %v", request.TaskCategory))
}
Expand All @@ -409,6 +415,8 @@ func (p *executionPersistenceClient) RangeCompleteHistoryTasks(
operation = metrics.PersistenceRangeCompleteVisibilityTasksScope
case tasks.CategoryIDReplication:
operation = metrics.PersistenceRangeCompleteReplicationTasksScope
case tasks.CategoryIDArchival:
operation = metrics.PersistenceRangeCompleteArchivalTasksScope
default:
return serviceerror.NewInternal(fmt.Sprintf("unknown task category type: %v", request.TaskCategory))
}
Expand Down