-
Notifications
You must be signed in to change notification settings - Fork 69
[WiP] Deployment and TaskQueue Stats API #571
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
base: master
Are you sure you want to change the base?
Conversation
repeated temporal.api.taskqueue.v1.TaskQueueStatDetails per_queue_stats = 1; | ||
|
||
// Aggregated backlog count across all task queues in this deployment version. | ||
int64 approximate_total_backlog_count = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Name is derived from TaskQueueStatDetails
's approximate_backlog_count
field.
6b25fed
to
fa2df53
Compare
f46f542
to
9778bd9
Compare
@@ -1085,6 +1085,16 @@ message DescribeTaskQueueResponse { | |||
temporal.api.taskqueue.v1.TaskQueueVersioningInfo versioning_info = 4; | |||
} | |||
|
|||
message GetTaskQueueStatsRequest { | |||
string namespace = 1; | |||
temporal.api.taskqueue.v1.TaskQueue task_queue = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this just be string
instead?
|
||
// Optional. Deployment version to return stats for. | ||
// If left empty, the current version will be queried. | ||
string deployment_version = 3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to double-check that build_id
isn't a better field name here.
message TaskQueueStatsInfo { | ||
temporal.api.taskqueue.v1.TaskQueue task_queue = 1; | ||
temporal.api.enums.v1.TaskQueueType task_queue_type = 2; | ||
temporal.api.taskqueue.v1.TaskQueueStats task_queue_stats = 3; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message only exists because TaskQueueStats
doesn't contain the task queue name and task_queue_type.
I considered adding them to the existing TaskQueueStats
, but was discouraged to do so.
ba4700d
to
2c3d3cf
Compare
// GetWorkerDeploymentStats returns the stats for all task queues in a deployment version. | ||
rpc GetWorkerDeploymentStats (GetWorkerDeploymentStatsRequest) returns (GetWorkerDeploymentStatsResponse) { | ||
option (google.api.http) = { | ||
get: "/namespaces/{namespace}/worker-deployments/{deployment_name}/{deployment_version}/stats" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since deployment_version
can be empty, I'm not sure this is right yet.
// GetTaskQueueStats returns stats for a single task queue. | ||
rpc GetTaskQueueStats (GetTaskQueueStatsRequest) returns (GetTaskQueueStatsResponse) { | ||
option (google.api.http) = { | ||
post: "/namespaces/{namespace}/task-queues/{task_queue.name}/type/{task_queue_type}/get-stats" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work with the task_queue_type
enum in there?
READ BEFORE MERGING: All PRs require approval by both Server AND SDK teams before merging! This is why the number of required approvals is "2" and not "1"--two reviewers from the same team is NOT sufficient. If your PR is not approved by someone in BOTH teams, it may be summarily reverted.
What changed?
Added two new APIs:
GetWorkerDeploymentStats
GetTaskQueueStats
Why?
To return task queue stats to users for making scaling decisions.
Breaking changes
No.
Server PR
temporalio/temporal#7581