Skip to content

[Infra] Indexer event-processing failures are only logged - no failed-event counter in /health or admin metrics #844

Description

@grantfox-oss

Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0

Labels: enhancement, backend, Stellar Wave, devops, infra

An indexer that's dropping every single event still reports as healthy, because nothing counts failures.

soroban-event-worker.ts:247-253 swallows per-event errors with logger.error and moves on, and there's no eventsProcessed/eventsFailed counter anywhere. /health only reports DB status and indexer lag, and lag stays low because the upsert bumps updatedAt on every poll regardless. Admin metrics only show lastLedger/lagSeconds. So a broken indexer that fails on every event looks fine from the outside.

What the fix has to hold to

  • processed/failed counts are tracked and visible
  • a spike in failures can surface as something other than "healthy"

Done when

  • eventsProcessed / eventsFailed / lastErrorAt counters maintained in the worker
  • exposed in GET /v1/admin/metrics.indexer, with a degraded signal when failures spike
  • unit test covering the new counters
  • tests + CI green

Where to start
backend/src/workers/soroban-event-worker.ts for the counters, backend/src/routes/v1/admin.routes.ts and backend/src/routes/health.routes.ts to expose them. A Prometheus exposition endpoint is out of scope. Small-to-medium; the judgment call is what counts as "degraded".

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Stellar WaveIssues in the Stellar wave programbackendBackend related tasksdevopsInfrastructure and CI/CDenhancementNew feature or requestinfraCI/CD and infrastructure

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions