Skip to content

feat(observability): event-bus soak counters for #306 - #439

Merged
vybe merged 1 commit into
mainfrom
feat/306-soak-counters
Apr 21, 2026
Merged

vybe merged 1 commit into
mainfrom
feat/306-soak-counters

Conversation

@vybe

@vybe vybe commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds in-memory counters on EventBus / StreamDispatcher / CleanupService so the Tier 2.5 soak gates from ORCHESTRATION_RELIABILITY_2026-04.md (delivery ≥99.9%, zero watchdog orphans) are measurable with one curl.
  • New admin-only GET /api/debug/event-bus-stats returns publisher / dispatcher / watchdog snapshots. Counters are monotonic and reset on process restart — compare deltas, not absolutes.
  • Instrumentation only — no behavior change.

Test plan

  • Boot backend, hit curl -H "Authorization: Bearer $TOKEN" http://localhost:8000/api/debug/event-bus-stats — expect all three keys (publisher, dispatcher, watchdog) populated.
  • Non-admin call returns 403.
  • Trigger a WS broadcast, re-poll — events_published / events_delivered incremented.
  • Disconnect a WS client mid-event, re-poll — counters reflect send_failures / eventual clients_evicted.

🤖 Generated with Claude Code

Adds in-memory counters on EventBus / StreamDispatcher / CleanupService and
an admin-only GET /api/debug/event-bus-stats endpoint so the Tier 2.5 soak
gates (delivery >=99.9%, zero watchdog orphans) are measurable with one
curl per instance.

Counters are monotonic and reset on process restart; compare deltas, not
absolutes. No behavior change — instrumentation only.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant