fix(backend): track indexer event failures in health and admin metrics - #997
Merged
ogazboiz merged 2 commits intoJul 30, 2026
Merged
Conversation
Count processed/failed indexer events in the Soroban worker and expose them on /health and admin metrics so a broken indexer cannot look healthy when lag stays low. Also restore a broken SSE merge and align Vitest coverage peer deps so the suite can run. Closes LabsCrypt#844 Co-authored-by: Cursor <cursoragent@cursor.com>
TCROWN10
force-pushed
the
fix/844-indexer-event-failure-counters
branch
from
July 30, 2026 10:10
78d240a to
1eaa449
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
eventsProcessed/eventsFailed/lastErrorAtcounters inSorobanEventWorker, with a sliding-window degraded signal when failure rate spikes (≥50% over 5 minutes with ≥3 samples).GET /v1/admin/metrics.indexer(live even on cache HIT) andGET /health, returning 503 when the indexer is enabled and degraded.sse.service.tsmerge and removes a duplicateIndexerStatemodel so Prisma/tests can run.Closes #844
Test plan
vitestforsoroban-event-worker,health,admin-metrics,sse.service/healthreturnseventsFailed/indexerDegradedafter forced processing failures