Skip to content

Add backend observability for contract event schema drifts #30

Description

@grantfox-oss

Backend parsers can silently ignore contract events when schema shapes drift, causing gaps in ingestion and stale data for analytics and reconciliation.

Affected areas: app/backend/src/ingestion/soroban-event.parser.ts, app/backend/src/ingestion/types/contract-event.types.ts, app/backend/src/monitoring/*, app/backend/src/sentry/*, app/backend/src/logging/*.

Implementation scope:

  • Add metrics and alerts for unknown event names, field mismatches, and parser rejections.
  • Capture contract ID, event name, schema version, and raw payload for rejected events in safe diagnostics.
  • Add a drift detector that compares runtime events to expected schema metadata.
  • Expose a developer-facing status endpoint for parser health.

Acceptance criteria:

  • Schema mismatches are visible in monitoring instead of only debug logs.
  • Unknown events are classified and counted separately from parse errors.
  • Alerts fire when ingestion rejects more than a threshold of events in a time window.

Metadata

Metadata

Assignees

Labels

Type

No type
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