diff --git a/openapi/openapiv2.json b/openapi/openapiv2.json index 52fe2e881..f132435b8 100644 --- a/openapi/openapiv2.json +++ b/openapi/openapiv2.json @@ -19600,6 +19600,10 @@ "type": "number", "format": "float", "description": "The approximate tasks per second dispatched from the task queue, averaging the last 30 seconds. These includes\ntasks whether or not they were added to/dispatched from the backlog or they were dispatched immediately without\ngoing to the backlog (sync-matched).\n\nThe difference between `tasks_add_rate` and `tasks_dispatch_rate` is a reliable metric for the rate at which\nbacklog grows/shrinks.\n\nNote: the actual tasks delivered to the workers may significantly be higher than the numbers reported by\ntasks_dispatch_rate, because:\n- Tasks can be sent to workers without going to the task queue. This is called Eager dispatch. Eager dispatch is\n enable for activities by default in the latest SDKs.\n- Tasks going to Sticky queue are not accounted for. Note that, typically, only the first workflow task of each\n workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific\n worker instance." + }, + "rateLimitingActive": { + "type": "boolean", + "description": "Whether rate limiting blocked any dispatches within the recent observation window (approximately\n30 seconds). When true, adding more workers will not increase throughput — the bottleneck is the\nrate limit, not worker count. This field is useful for auto-scaling systems to avoid unnecessary\nscale-up." } }, "description": "TaskQueueStats contains statistics about task queue backlog and activity.\n\nFor workflow task queue type, this result is partial because tasks sent to sticky queues are not included. Read\ncomments above each metric to understand the impact of sticky queue exclusion on that metric accuracy." diff --git a/openapi/openapiv3.yaml b/openapi/openapiv3.yaml index 98e2c80ad..4045bd5cd 100644 --- a/openapi/openapiv3.yaml +++ b/openapi/openapiv3.yaml @@ -17335,6 +17335,13 @@ components: workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific worker instance. format: float + rateLimitingActive: + type: boolean + description: |- + Whether rate limiting blocked any dispatches within the recent observation window (approximately + 30 seconds). When true, adding more workers will not increase throughput — the bottleneck is the + rate limit, not worker count. This field is useful for auto-scaling systems to avoid unnecessary + scale-up. description: |- TaskQueueStats contains statistics about task queue backlog and activity. diff --git a/temporal/api/taskqueue/v1/message.proto b/temporal/api/taskqueue/v1/message.proto index 1652f2f70..6ab668fdb 100644 --- a/temporal/api/taskqueue/v1/message.proto +++ b/temporal/api/taskqueue/v1/message.proto @@ -143,6 +143,12 @@ message TaskQueueStats { // workflow goes to a normal queue, and the rest workflow tasks go to the Sticky queue associated with a specific // worker instance. float tasks_dispatch_rate = 4; + + // Whether rate limiting blocked any dispatches within the recent observation window (approximately + // 30 seconds). When true, adding more workers will not increase throughput — the bottleneck is the + // rate limit, not worker count. This field is useful for auto-scaling systems to avoid unnecessary + // scale-up. + bool rate_limiting_active = 5; } // Deprecated. Use `InternalTaskQueueStatus`. This is kept until `DescribeTaskQueue` supports legacy behavior.