Skip to content

Instantly share code, notes, and snippets.

-- Queries for worker-centric DBOS Observability
-- Many of these are supported by the DBOS Conductor UI
-- https://docs.dbos.dev/production/conductor
-- For questions, reach out to alex.poliakov@dbos.dev
-- DBOS assigns each worker an `executor_id` when it starts. You can set the custom ID in DBOS config:
-- https://docs.dbos.dev/python/reference/configuration
-- This query returns all workflows that are currently running on each worker by executor_id
-- 1. Query what executors are doing at any given time
@apoliakov
apoliakov / count_actions.sql
Created December 23, 2025 04:29
Counting DBOS Actions
WITH daily_workflows AS (
SELECT
DATE_TRUNC('day', TO_TIMESTAMP(created_at / 1000)) AS day,
workflow_uuid
FROM dbos.workflow_status
)
SELECT
dw.day,
COUNT(DISTINCT dw.workflow_uuid) AS workflow_count,
COUNT(oo.workflow_uuid) AS step_count,