Skip to content

/healthz endpoint for relayer/ticker/book observability #159

@ozpool

Description

@ozpool

Problem

No single way to confirm the edge's background workers are alive. During this week's bring-up the oracle relayer was silently broken twice (feed-id prefix mismatch, single-VAA decode) before logs surfaced it.

Proposal

New unauth endpoint:

GET /healthz

Returns:

{
  "ok": true,
  "uptime_sec": 123,
  "oracle": { "alive": true, "lastTickAgoMs": 480, "feeds": 3 },
  "stats_ticker": { "alive": true, "lastTickAgoMs": 1100 },
  "orderbooks": { "btc-usd": { "bids": 5, "asks": 5 }, ... },
  "subscribers": { "oracle.btc-usd": 2, ... }
}

ok is false when any worker hasn't ticked in 2× its expected period.

Acceptance

  • curl returns JSON with the keys above.
  • dev-up-all.sh polls /healthz after step 4 (instead of grepping for an orderbook level) and shows a clean green when everything's up.
  • CI / monitoring can scrape it.

Notes

Nice-to-have, not blocking. Pays for itself the first time a worker dies silently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions