Skip to content

Metrics v2 — per-host breaker state + latency percentiles #47

Description

@fusengine

Extend B4 (#28) browser_metrics.

Scope

  • Expose live circuit-breaker state per host (open/half-open/closed + cooldown remaining), read from the B2 breaker map (needs a read accessor; breaker.ts is at the 100-line cap → split first).
  • Latency percentiles (p50/p95) via a small bounded sample buffer (currently only avg/min/max).
  • Optional per-minute rate (requestsFinishedPerMinute style).

Acceptance

  • browser_metrics returns breakerHosts: [{ origin, state, retryInMs }] and p95DurationMs.
  • No new dependency; counters stay process-global.

Priority — medium; pure observability, low risk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions