Skip to content

Add Projection Lag Alert Threshold Tests #655

@Emmyt24

Description

@Emmyt24

title: Add Projection Lag Alert Threshold Tests

Description:
Test operational thresholds that detect when backend indexing falls too far behind on-chain transaction confirmations.

Requirements and Context:

  • Projection lag is a core production risk for user trust
  • Monitoring is only useful if threshold logic is validated
  • Must cover normal lag, warning lag, and critical lag scenarios

Suggested Execution:
Fork and Branch

  • git checkout -b test/projection-lag-thresholds

Implement Changes::
Files to Edit:

  • monitoring/metrics/prometheus-config.ts - Add or confirm lag thresholds
  • backend/src/services/stellarEventListener.ts - Emit measurable lag values
  • monitoring/health-checks/health-monitor.ts - Consume threshold outputs if appropriate

Files to Create:

  • monitoring/tests/projectionLagThresholds.test.ts - Lag threshold tests

Test

  • Verify alert thresholds fire at expected lag values
  • Verify healthy lag does not create noise
  • Verify critical lag is distinguishable from transient delay

Commit

  • git add .
  • git commit -m "test(integration): add projection lag alert threshold coverage"

Guidelines:

  • Base thresholds on realistic ingestion timing
  • Keep warnings actionable for operators

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions