How long a request waits for a database connection, and queries take, is not measured #367

Closed
opened 2026-10-25 08:56:24 -07:00 by rays · 1 comment
Owner

Found reviewing what production's traces and metrics leave out, 2026-10-25. /metrics has the pool's connections in use, sampled every 15 s, and nothing of the wait for one or a query's time. #241 (80-330 ms to open a connection) was found by laying traces beside Postgres by hand. Wanted: histograms of the wait to acquire a connection and of query time.

Found reviewing what production's traces and metrics leave out, 2026-10-25. /metrics has the pool's connections in use, sampled every 15 s, and nothing of the wait for one or a query's time. #241 (80-330 ms to open a connection) was found by laying traces beside Postgres by hand. Wanted: histograms of the wait to acquire a connection and of query time.
rays added the enhancement label 2026-10-25 08:56:24 -07:00
Author
Owner

Fixed in dd91602: ipx_db_query_seconds{kind} from SeaORM's metric callback, every statement; ipx_db_wait_seconds for hand-written SQL in db.rs (about half), measured as the call less the statement. SeaORM's own queries' wait is not seen (shortcut, noted in db.rs). On the dashboard's API row. Deployed 2026-10-25.

Fixed in dd91602: ipx_db_query_seconds{kind} from SeaORM's metric callback, every statement; ipx_db_wait_seconds for hand-written SQL in db.rs (about half), measured as the call less the statement. SeaORM's own queries' wait is not seen (shortcut, noted in db.rs). On the dashboard's API row. Deployed 2026-10-25.
rays closed this issue 2026-10-25 09:35:50 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#367