Skip to content

Commit 789de85

Browse files
committed
Deployment and TaskQueue Stats API
1 parent e335985 commit 789de85

File tree

5 files changed

+570
-2
lines changed

5 files changed

+570
-2
lines changed

openapi/openapiv2.json

+268
Original file line numberDiff line numberDiff line change
@@ -1610,6 +1610,75 @@
16101610
]
16111611
}
16121612
},
1613+
"/api/v1/namespaces/{namespace}/task-queues/{taskQueue.name}/type/{taskQueueType}/get-stats": {
1614+
"post": {
1615+
"summary": "GetTaskQueueStats returns stats for a single task queue.",
1616+
"operationId": "GetTaskQueueStats2",
1617+
"responses": {
1618+
"200": {
1619+
"description": "A successful response.",
1620+
"schema": {
1621+
"$ref": "#/definitions/v1GetTaskQueueStatsResponse"
1622+
}
1623+
},
1624+
"default": {
1625+
"description": "An unexpected error response.",
1626+
"schema": {
1627+
"$ref": "#/definitions/rpcStatus"
1628+
}
1629+
}
1630+
},
1631+
"parameters": [
1632+
{
1633+
"name": "namespace",
1634+
"in": "path",
1635+
"required": true,
1636+
"type": "string"
1637+
},
1638+
{
1639+
"name": "taskQueue.name",
1640+
"in": "path",
1641+
"required": true,
1642+
"type": "string"
1643+
},
1644+
{
1645+
"name": "taskQueueType",
1646+
"in": "path",
1647+
"required": true,
1648+
"type": "string",
1649+
"enum": [
1650+
"TASK_QUEUE_TYPE_UNSPECIFIED",
1651+
"TASK_QUEUE_TYPE_WORKFLOW",
1652+
"TASK_QUEUE_TYPE_ACTIVITY",
1653+
"TASK_QUEUE_TYPE_NEXUS"
1654+
]
1655+
},
1656+
{
1657+
"name": "taskQueue.kind",
1658+
"description": "Default: TASK_QUEUE_KIND_NORMAL.\n\n - TASK_QUEUE_KIND_NORMAL: Tasks from a normal workflow task queue always include complete workflow history\n\nThe task queue specified by the user is always a normal task queue. There can be as many\nworkers as desired for a single normal task queue. All those workers may pick up tasks from\nthat queue.\n - TASK_QUEUE_KIND_STICKY: A sticky queue only includes new history since the last workflow task, and they are\nper-worker.\n\nSticky queues are created dynamically by each worker during their start up. They only exist\nfor the lifetime of the worker process. Tasks in a sticky task queue are only available to\nthe worker that created the sticky queue.\n\nSticky queues are only for workflow tasks. There are no sticky task queues for activities.",
1659+
"in": "query",
1660+
"required": false,
1661+
"type": "string",
1662+
"enum": [
1663+
"TASK_QUEUE_KIND_UNSPECIFIED",
1664+
"TASK_QUEUE_KIND_NORMAL",
1665+
"TASK_QUEUE_KIND_STICKY"
1666+
],
1667+
"default": "TASK_QUEUE_KIND_UNSPECIFIED"
1668+
},
1669+
{
1670+
"name": "taskQueue.normalName",
1671+
"description": "Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of\nthe normal task queue that the sticky worker is running on.",
1672+
"in": "query",
1673+
"required": false,
1674+
"type": "string"
1675+
}
1676+
],
1677+
"tags": [
1678+
"WorkflowService"
1679+
]
1680+
}
1681+
},
16131682
"/api/v1/namespaces/{namespace}/task-queues/{taskQueue}/worker-build-id-compatibility": {
16141683
"get": {
16151684
"summary": "Deprecated. Use `GetWorkerVersioningRules`.\nFetches the worker build id versioning sets for a task queue.",
@@ -2080,6 +2149,51 @@
20802149
]
20812150
}
20822151
},
2152+
"/api/v1/namespaces/{namespace}/worker-deployments/{deploymentName}/{deploymentVersion}/stats": {
2153+
"get": {
2154+
"summary": "GetWorkerDeploymentStats returns the stats for all task queues in a deployment version.",
2155+
"operationId": "GetWorkerDeploymentStats2",
2156+
"responses": {
2157+
"200": {
2158+
"description": "A successful response.",
2159+
"schema": {
2160+
"$ref": "#/definitions/v1GetWorkerDeploymentStatsResponse"
2161+
}
2162+
},
2163+
"default": {
2164+
"description": "An unexpected error response.",
2165+
"schema": {
2166+
"$ref": "#/definitions/rpcStatus"
2167+
}
2168+
}
2169+
},
2170+
"parameters": [
2171+
{
2172+
"name": "namespace",
2173+
"in": "path",
2174+
"required": true,
2175+
"type": "string"
2176+
},
2177+
{
2178+
"name": "deploymentName",
2179+
"description": "Name of the deployment to return stats for.\n",
2180+
"in": "path",
2181+
"required": true,
2182+
"type": "string"
2183+
},
2184+
{
2185+
"name": "deploymentVersion",
2186+
"description": "Optional. Deployment version to return stats for.\nIf left empty, the current version will be queried.",
2187+
"in": "path",
2188+
"required": true,
2189+
"type": "string"
2190+
}
2191+
],
2192+
"tags": [
2193+
"WorkflowService"
2194+
]
2195+
}
2196+
},
20832197
"/api/v1/namespaces/{namespace}/worker-task-reachability": {
20842198
"get": {
20852199
"summary": "Deprecated. Use `DescribeTaskQueue`.",
@@ -5123,6 +5237,75 @@
51235237
]
51245238
}
51255239
},
5240+
"/namespaces/{namespace}/task-queues/{taskQueue.name}/type/{taskQueueType}/get-stats": {
5241+
"post": {
5242+
"summary": "GetTaskQueueStats returns stats for a single task queue.",
5243+
"operationId": "GetTaskQueueStats",
5244+
"responses": {
5245+
"200": {
5246+
"description": "A successful response.",
5247+
"schema": {
5248+
"$ref": "#/definitions/v1GetTaskQueueStatsResponse"
5249+
}
5250+
},
5251+
"default": {
5252+
"description": "An unexpected error response.",
5253+
"schema": {
5254+
"$ref": "#/definitions/rpcStatus"
5255+
}
5256+
}
5257+
},
5258+
"parameters": [
5259+
{
5260+
"name": "namespace",
5261+
"in": "path",
5262+
"required": true,
5263+
"type": "string"
5264+
},
5265+
{
5266+
"name": "taskQueue.name",
5267+
"in": "path",
5268+
"required": true,
5269+
"type": "string"
5270+
},
5271+
{
5272+
"name": "taskQueueType",
5273+
"in": "path",
5274+
"required": true,
5275+
"type": "string",
5276+
"enum": [
5277+
"TASK_QUEUE_TYPE_UNSPECIFIED",
5278+
"TASK_QUEUE_TYPE_WORKFLOW",
5279+
"TASK_QUEUE_TYPE_ACTIVITY",
5280+
"TASK_QUEUE_TYPE_NEXUS"
5281+
]
5282+
},
5283+
{
5284+
"name": "taskQueue.kind",
5285+
"description": "Default: TASK_QUEUE_KIND_NORMAL.\n\n - TASK_QUEUE_KIND_NORMAL: Tasks from a normal workflow task queue always include complete workflow history\n\nThe task queue specified by the user is always a normal task queue. There can be as many\nworkers as desired for a single normal task queue. All those workers may pick up tasks from\nthat queue.\n - TASK_QUEUE_KIND_STICKY: A sticky queue only includes new history since the last workflow task, and they are\nper-worker.\n\nSticky queues are created dynamically by each worker during their start up. They only exist\nfor the lifetime of the worker process. Tasks in a sticky task queue are only available to\nthe worker that created the sticky queue.\n\nSticky queues are only for workflow tasks. There are no sticky task queues for activities.",
5286+
"in": "query",
5287+
"required": false,
5288+
"type": "string",
5289+
"enum": [
5290+
"TASK_QUEUE_KIND_UNSPECIFIED",
5291+
"TASK_QUEUE_KIND_NORMAL",
5292+
"TASK_QUEUE_KIND_STICKY"
5293+
],
5294+
"default": "TASK_QUEUE_KIND_UNSPECIFIED"
5295+
},
5296+
{
5297+
"name": "taskQueue.normalName",
5298+
"description": "Iff kind == TASK_QUEUE_KIND_STICKY, then this field contains the name of\nthe normal task queue that the sticky worker is running on.",
5299+
"in": "query",
5300+
"required": false,
5301+
"type": "string"
5302+
}
5303+
],
5304+
"tags": [
5305+
"WorkflowService"
5306+
]
5307+
}
5308+
},
51265309
"/namespaces/{namespace}/task-queues/{taskQueue}/worker-build-id-compatibility": {
51275310
"get": {
51285311
"summary": "Deprecated. Use `GetWorkerVersioningRules`.\nFetches the worker build id versioning sets for a task queue.",
@@ -5554,6 +5737,51 @@
55545737
]
55555738
}
55565739
},
5740+
"/namespaces/{namespace}/worker-deployments/{deploymentName}/{deploymentVersion}/stats": {
5741+
"get": {
5742+
"summary": "GetWorkerDeploymentStats returns the stats for all task queues in a deployment version.",
5743+
"operationId": "GetWorkerDeploymentStats",
5744+
"responses": {
5745+
"200": {
5746+
"description": "A successful response.",
5747+
"schema": {
5748+
"$ref": "#/definitions/v1GetWorkerDeploymentStatsResponse"
5749+
}
5750+
},
5751+
"default": {
5752+
"description": "An unexpected error response.",
5753+
"schema": {
5754+
"$ref": "#/definitions/rpcStatus"
5755+
}
5756+
}
5757+
},
5758+
"parameters": [
5759+
{
5760+
"name": "namespace",
5761+
"in": "path",
5762+
"required": true,
5763+
"type": "string"
5764+
},
5765+
{
5766+
"name": "deploymentName",
5767+
"description": "Name of the deployment to return stats for.\n",
5768+
"in": "path",
5769+
"required": true,
5770+
"type": "string"
5771+
},
5772+
{
5773+
"name": "deploymentVersion",
5774+
"description": "Optional. Deployment version to return stats for.\nIf left empty, the current version will be queried.",
5775+
"in": "path",
5776+
"required": true,
5777+
"type": "string"
5778+
}
5779+
],
5780+
"tags": [
5781+
"WorkflowService"
5782+
]
5783+
}
5784+
},
55575785
"/namespaces/{namespace}/worker-task-reachability": {
55585786
"get": {
55595787
"summary": "Deprecated. Use `DescribeTaskQueue`.",
@@ -10306,6 +10534,14 @@
1030610534
},
1030710535
"description": "System capability details."
1030810536
},
10537+
"v1GetTaskQueueStatsResponse": {
10538+
"type": "object",
10539+
"properties": {
10540+
"taskQueueStats": {
10541+
"$ref": "#/definitions/v1TaskQueueStats"
10542+
}
10543+
}
10544+
},
1030910545
"v1GetWorkerBuildIdCompatibilityResponse": {
1031010546
"type": "object",
1031110547
"properties": {
@@ -10320,6 +10556,24 @@
1032010556
},
1032110557
"title": "[cleanup-wv-pre-release]"
1032210558
},
10559+
"v1GetWorkerDeploymentStatsResponse": {
10560+
"type": "object",
10561+
"properties": {
10562+
"perQueueMetrics": {
10563+
"type": "array",
10564+
"items": {
10565+
"type": "object",
10566+
"$ref": "#/definitions/v1TaskQueueStatsInfo"
10567+
},
10568+
"title": "Collection of stats for all task queues in the requested deployment.\nNote that the data is"
10569+
},
10570+
"approximateTotalBacklogCount": {
10571+
"type": "string",
10572+
"format": "int64",
10573+
"title": "The sum of backlog counts across all task queues in the deployment.\nNote that same as the task queue metrics, this value is"
10574+
}
10575+
}
10576+
},
1032310577
"v1GetWorkerTaskReachabilityResponse": {
1032410578
"type": "object",
1032510579
"properties": {
@@ -13984,6 +14238,20 @@
1398414238
},
1398514239
"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."
1398614240
},
14241+
"v1TaskQueueStatsInfo": {
14242+
"type": "object",
14243+
"properties": {
14244+
"taskQueue": {
14245+
"$ref": "#/definitions/v1TaskQueue"
14246+
},
14247+
"taskQueueType": {
14248+
"$ref": "#/definitions/v1TaskQueueType"
14249+
},
14250+
"taskQueueStats": {
14251+
"$ref": "#/definitions/v1TaskQueueStats"
14252+
}
14253+
}
14254+
},
1398714255
"v1TaskQueueStatus": {
1398814256
"type": "object",
1398914257
"properties": {

0 commit comments

Comments
 (0)