get_workflow_aggregates
Fetch workflow aggregate metrics grouped by dimensions like status, queue, or name to monitor workflow health and identify bottlenecks such as failures or queue delays.
Instructions
Get workflow aggregate metrics from DBOS Conductor.
Returns workflow aggregates grouped by one or more dimensions. Useful for dashboards and understanding workflow status at a glance (e.g., "how many workflows failed today?", "how many workflows are pending per queue?", "what's the worst queue-wait time per workflow name?").
Select at least one select_* flag to populate aggregate values. At least one group_by_* flag is mandatory to break the results down by dimension; a query with no group_by_* will fail.
Args: application_name (string, required): Name of the DBOS application group_by_status (bool, optional): Group results by workflow status (default: false) group_by_name (bool, optional): Group results by workflow name (default: false) group_by_queue_name (bool, optional): Group results by queue name (default: false) group_by_executor_id (bool, optional): Group results by executor ID (default: false) group_by_application_version (bool, optional): Group results by application version (default: false) select_count (bool, optional): Include count of workflows in each group (default: false) select_min_created_at (bool, optional): Include min created_at (epoch ms) in each group (default: false) select_max_queue_wait_ms (bool, optional): Include max queue wait time (ms) in each group (default: false) select_max_total_latency_ms (bool, optional): Include max end-to-end latency (ms) in each group (default: false) status (array of strings, optional): Filter to these statuses before aggregating start_time (string, optional): Filter workflows created after this time (ISO 8601) end_time (string, optional): Filter workflows created before this time (ISO 8601) completed_after (string, optional): Filter workflows completed after this time (ISO 8601) completed_before (string, optional): Filter workflows completed before this time (ISO 8601) dequeued_after (string, optional): Filter workflows dequeued after this time (ISO 8601) dequeued_before (string, optional): Filter workflows dequeued before this time (ISO 8601) name (array of strings, optional): Filter to these workflow names before aggregating app_version (array of strings, optional): Filter to these application versions executor_id (array of strings, optional): Filter to these executor IDs queue_name (array of strings, optional): Filter to these queue names workflow_id_prefix (array of strings, optional): Filter to workflow IDs starting with these prefixes time_bucket_size_ms (int, optional): Bucket aggregates into time windows of this many milliseconds
Returns: aggregates: Array of aggregate objects, each containing: - group (object): Map of dimension names to values (e.g., {"status": "ERROR", "name": "processOrder"}) - count (int, optional): Number of workflows matching this group (if select_count) - min_created_at (int, optional): Earliest created_at in epoch ms (if select_min_created_at) - max_queue_wait_ms (int, optional): Max queue wait time in ms (if select_max_queue_wait_ms) - max_total_latency_ms (int, optional): Max end-to-end latency in ms (if select_max_total_latency_ms) application (string): Name of the application queried
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| status | No | ||
| end_time | No | ||
| queue_name | No | ||
| start_time | No | ||
| app_version | No | ||
| executor_id | No | ||
| select_count | No | ||
| group_by_name | No | ||
| dequeued_after | No | ||
| completed_after | No | ||
| dequeued_before | No | ||
| group_by_status | No | ||
| application_name | Yes | ||
| completed_before | No | ||
| workflow_id_prefix | No | ||
| group_by_queue_name | No | ||
| time_bucket_size_ms | No | ||
| group_by_executor_id | No | ||
| select_min_created_at | No | ||
| select_max_queue_wait_ms | No | ||
| select_max_total_latency_ms | No | ||
| group_by_application_version | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||