mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-30 16:20:35 +02:00
* fix(metrics): harden business sampler quality (MUL-2965) Co-authored-by: multica-agent <github@multica.ai> * fix(metrics): alert on sampler acquire failures Co-authored-by: multica-agent <github@multica.ai> --------- Co-authored-by: Eve <eve@multica-ai.local> Co-authored-by: multica-agent <github@multica.ai>
9 lines
445 B
SQL
9 lines
445 B
SQL
-- Covers sampler reads over runtime heartbeats:
|
|
-- * runtime_online: last_seen_at > now() - online window
|
|
-- * runtime_heartbeat_age: last_seen_at > now() - 15 minutes ORDER BY last_seen_at DESC
|
|
--
|
|
-- agent_runtime heartbeat writes are frequent, so this must stay in its own
|
|
-- single-statement migration and must use CONCURRENTLY.
|
|
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_agent_runtime_last_seen_at
|
|
ON agent_runtime (last_seen_at);
|