get_workflow_aggregates
Retrieve workflow aggregates grouped by status, queue, name, or other dimensions to see counts, failures, and latency at a glance for dashboards.
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) group_by_application_name (bool, optional): Group results by application name (default: false) select_count (bool, optional): Include count of workflows in each group (default: false) select_min_created_at (bool, optional): Include earliest creation time (ISO 8601) 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 schedule_name (array of strings, optional): Filter to workflows started by these schedules
Returns: aggregates: Array of aggregate objects, each containing: - group (object): Map of dimension names to values. Keys are snake_case: status, name, queue_name, executor_id, application_version, application_name (e.g., {"status": "ERROR", "name": "processOrder"}). If time_bucket_size_ms is set, each group also carries a time_bucket key whose value is the bucket's start time as Unix epoch milliseconds (a string), not ISO 8601. - count (int, optional): Number of workflows matching this group (if select_count) - minCreatedAt (string, optional): Earliest creation time, ISO 8601 (if select_min_created_at) - maxQueueWaitMs (int, optional): Max queue wait time in ms (if select_max_queue_wait_ms) - maxTotalLatencyMs (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 | ||
| schedule_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 | ||
| group_by_application_name | No | ||
| select_max_total_latency_ms | No | ||
| group_by_application_version | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||