Skip to content

Conversation

devin-ai-integration[bot]
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Sep 1, 2025

Summary

Adds two new Prometheus gauge metrics to the price pusher to track actual price values from both Pyth (source) and target chains:

  • pyth_source_price{price_id, alias} - Latest price value from Pyth source
  • pyth_target_price{price_id, alias} - Latest price value from target chain

The metrics are updated in the same controller loop where timestamp metrics are already tracked, using consistent labeling and conditional logic.

Rationale

This addresses a debugging need where price discrepancies were observed between UI displays and actual feeds. By exposing the actual price values (not just timestamps) in metrics, operators can monitor and compare price values across different data sources in Grafana dashboards, particularly useful for Solana where the API explorer isn't available.

How has this been tested?

  • Current tests cover my changes (no breaking changes to existing functionality)
  • Added new tests
  • Manually tested the code (verified builds and CI passes)

Manual verification:

  • Code builds successfully with pnpm turbo build
  • All CI checks pass (11/11)
  • No linting or formatting issues

Human Review Checklist

Please pay special attention to:

  1. String-to-Number conversion safety: Verify that Number(sourcePrice) and Number(targetPrice) handle all expected price string formats correctly without runtime errors
  2. Metrics functionality: Test that the new metrics are properly exposed at the /metrics endpoint and can be queried in Grafana
  3. Metric naming conventions: Confirm pyth_source_price and pyth_target_price follow Prometheus naming standards
  4. Performance impact: Verify the additional metric updates don't introduce noticeable performance overhead

Link to Devin run: https://app.devin.ai/sessions/2d00dbc3592645519ae39b8e78dfda4d
Requested by: Ali ([email protected])

- Add pyth_source_price and pyth_target_price gauge metrics to track latest price values
- Update controller to set price value metrics alongside existing timestamp metrics
- Use consistent labeling with price_id and alias for metric identification
- Convert string prices to numbers for Prometheus gauge compatibility

Co-Authored-By: Ali <[email protected]>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

vercel bot commented Sep 1, 2025

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

7 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
api-reference Skipped Skipped Sep 1, 2025 0:51am
component-library Skipped Skipped Sep 1, 2025 0:51am
developer-hub Skipped Skipped Sep 1, 2025 0:51am
entropy-explorer Skipped Skipped Sep 1, 2025 0:51am
insights Skipped Skipped Sep 1, 2025 0:51am
proposals Skipped Skipped Sep 1, 2025 0:51am
staking Skipped Skipped Sep 1, 2025 0:51am

@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner September 1, 2025 12:51
@vercel vercel bot temporarily deployed to Preview – insights September 1, 2025 12:51 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer September 1, 2025 12:51 Inactive
@vercel vercel bot temporarily deployed to Preview – component-library September 1, 2025 12:51 Inactive
@vercel vercel bot temporarily deployed to Preview – developer-hub September 1, 2025 12:51 Inactive
@vercel vercel bot temporarily deployed to Preview – proposals September 1, 2025 12:51 Inactive
@vercel vercel bot temporarily deployed to Preview – staking September 1, 2025 12:51 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference September 1, 2025 12:51 Inactive
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.

1 participant