Turn on a database's statement statistics and slow log
Turns on what streamEngineStats lists as off. Postgres: adds pg_stat_statements to shared_preload_libraries and restarts the service, then creates the extension in the `postgres` database on a second call, and logs statements slower than 250 ms with lock waits, through ALTER SYSTEM. MySQL and MariaDB: the statement history consumer and deadlock printing at runtime, and on MariaDB user statistics. Never resets any counter.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
Value in
- "production"
- "preview"
- "development"
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/workspaces/string/apps/string/services/string/engine/insights"{ "applied": [ "string" ], "restarted": true, "insights": { "statements": "on", "slowLog": "on", "slowLogMs": 0, "enable": "none", "note": "string" }}Explain a statement's plan POST
Plans a statement from streamEngineStatements without running it: EXPLAIN (GENERIC_PLAN) in a read-only transaction on Postgres 16 and later, EXPLAIN FORMAT=JSON on the digest's sample text on MySQL. Flags a sequential scan with a filter on a table of 10,000 rows or more and suggests an index built from the plan's columns.
Read a worker's jobs and queues GET
Finds the job library the service uses and reads it: BullMQ, Sidekiq and Celery state in a Redis service of the same app, RabbitMQ queues, and Sidekiq and Celery job lines in the service's own logs. Returns finished and failed runs per step, each job type with its failure share, run-time p95 and newest outcomes, repeat and cron schedules, and each queue with its waiting jobs, rates, oldest job, consumers and dead letters. `searched` says where Monitor looked and what it found; nothing is invented when nothing is found. Works on a worker, a Redis or a RabbitMQ service. Failure texts need readServiceJobDetails.