Skip to content

feat(hermes): add staleness metrics #2978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 21, 2025
Merged

Conversation

tejasbadadare
Copy link
Contributor

@tejasbadadare tejasbadadare commented Aug 21, 2025

Summary

Add histogram metrics to track latency in price feed updates:

  • publish_to_receive_latency_seconds: Time from publish_time to receive_time for each update
  • ws_broadcast_latency_seconds: Time from receive_time to WebSocket flush time
    • Takes the min receive_time from the update batch and compares it against wall time
  • sse_broadcast_latency_seconds: Time from receive_time to SSE send time

Notes:

  • Not sure how close we can get to actually measure e2e send latency in WS/SSE, but I tried to observe the latency as close to the send as possible.
  • Didn't add per-feed labels to avoid exploding cardinality.

https://linear.app/douro-labs/issue/PF-396/hermes-price-staleness-metrics

Testing

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code

Copy link

vercel bot commented Aug 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
api-reference Ready Ready Preview Comment Aug 21, 2025 0:59am
component-library Ready Ready Preview Comment Aug 21, 2025 0:59am
developer-hub Ready Ready Preview Comment Aug 21, 2025 0:59am
entropy-explorer Ready Ready Preview Comment Aug 21, 2025 0:59am
insights Ready Ready Preview Comment Aug 21, 2025 0:59am
proposals Ready Ready Preview Comment Aug 21, 2025 0:59am
staking Ready Ready Preview Comment Aug 21, 2025 0:59am

@tejasbadadare tejasbadadare merged commit b18d6ac into main Aug 21, 2025
10 checks passed
@tejasbadadare tejasbadadare deleted the tb/hermes/staleness-metrics-2 branch August 21, 2025 17:10
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.

2 participants