Skip to content

Add indexer health monitoring and backfill infrastructure - #580

Merged
Akatenvictor merged 2 commits into
AudioBitsStellar:mainfrom
all-opensource-projects:feature/indexer-health-monitoring
Aug 31, 2026
Merged

Add indexer health monitoring and backfill infrastructure#580
Akatenvictor merged 2 commits into
AudioBitsStellar:mainfrom
all-opensource-projects:feature/indexer-health-monitoring

Conversation

@meshackyaro

Copy link
Copy Markdown
Contributor

Summary

This PR implements a comprehensive indexer health monitoring system for tracking blockchain event processing across all 5 AudioBlock Stellar smart contracts.

Changes

Issue #241: Prometheus Metrics

  • Added indexer_lag_ledgers gauge (labeled by network/contract)
  • Added indexer_events_processed_total counter (labeled by network/contract)
  • Added indexer_errors_total counter (labeled by network/contract)
  • Metrics exposed via existing /metrics endpoint

Issue #242: Grafana Dashboard

  • Created monitoring/dashboards/audioblock-indexer.json
  • Visualizes lag, throughput, error rate, and processing metrics
  • Includes alert rules for high lag and error rate
  • Covers all 5 contracts
  • Auto-loads via existing dashboard provisioning

Issue #250: Backfill Framework

  • Created backfill_status entity with completion marker
  • Prevents accidental re-execution of historical imports
  • Documented runbook at docs/indexer-backfill-runbook.md
  • Safe abort and resume capability

Issue #253: Admin Status Endpoint

  • Added GET /api/admin/indexer/status endpoint
  • Returns cursor position, lag, event count, and last error per contract
  • Admin-gated via existing requirePermission middleware

Testing

Run migration, test endpoint, view metrics and dashboard.

Closes #241, Closes #242, Closes #250, Closes #253

meshackyaro and others added 2 commits August 31, 2026 08:49
- Add Prometheus metrics for indexer lag, events processed, and errors
- Create IndexerService to track cursor positions and backfill status
- Add admin endpoint GET /api/admin/indexer/status for health monitoring
- Build Grafana dashboard for indexer visualization across all 5 contracts
- Add database entities and migration for indexer_cursors and backfill_status
- Document backfill runbook with safety mechanisms and resume capability

This implementation covers:
- Issue AudioBitsStellar#241: Prometheus metrics (indexer_lag_ledgers, indexer_events_processed_total, indexer_errors_total)
- Issue AudioBitsStellar#242: Grafana dashboard (monitoring/dashboards/audioblock-indexer.json)
- Issue AudioBitsStellar#250: Backfill framework with completion markers and documentation
- Issue AudioBitsStellar#253: Admin-only indexer status endpoint with per-contract health data
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@meshackyaro Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Akatenvictor
Akatenvictor merged commit 33b8b76 into AudioBitsStellar:main Aug 31, 2026
1 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants