Skip to content

feat(horizon): observe cursor age and settlement latency - #210

Merged
Manuel1234477 merged 2 commits into
StellarGateLabs:mainfrom
Markodiba:feature/134-settlement-poller-lag-metrics
Jul 29, 2026
Merged

feat(horizon): observe cursor age and settlement latency#210
Manuel1234477 merged 2 commits into
StellarGateLabs:mainfrom
Markodiba:feature/134-settlement-poller-lag-metrics

Conversation

@Markodiba

Copy link
Copy Markdown
Contributor

Summary

  • Add a created_at field to HorizonPayment (Horizon's operation timestamp) and an elapsed_secs helper.
  • Log cursor_age_secs at the poller's page checkpoint and the stream listener's event handler, so a stalled/lagging cursor is observable instead of silent.
  • Log settlement_latency_secs at the existing "payment settled" log point in settle().

Closes #134

Validation performed

  • cargo fmt --check — clean
  • cargo check --all-targets — no errors introduced (one pre-existing, unrelated error in src/config.rs — missing webhook_timeout_secs field in a Config initializer — exists on main prior to this change and is out of scope for this issue)

Markodiba and others added 2 commits July 25, 2026 16:18
Log cursor_age_secs at the poller/stream loops' existing checkpoints
and settlement_latency_secs at the existing settlement log point, so
poller lag and slow settlements are visible before a merchant notices.

Closes StellarGateLabs#134
@Manuel1234477
Manuel1234477 merged commit 1fcd9ae into StellarGateLabs:main Jul 29, 2026
1 of 5 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

Development

Successfully merging this pull request may close these issues.

No settlement-latency or poller-lag metric

2 participants