Skip to content
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

chore: init KeeperMetrics with chain_id and provider_address, bump version #2318

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Initialize KeeperMetrics with chain_ids and provider_addresses

This PR modifies the KeeperMetrics::new method to accept Vec<chain_ids> and Vec<provider_addresses> as parameters, allowing proper initialization of metrics for all chains at once. This replaces the previous approach of initializing metrics one chain at a time.

Changes:

  • Modified KeeperMetrics::new to accept Vec for chain_ids and Vec for provider_addresses
  • Updated run_keeper to collect all chain IDs and provider addresses before initializing metrics
  • Bumped fortuna version from 7.4.0 to 7.4.1

Link to Devin run: https://app.devin.ai/sessions/6db704545ae34e178633b42fefb736b5

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

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link

vercel bot commented Jan 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 9:07pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 9:07pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 31, 2025 9:07pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 9:07pm
entropy-debugger ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 9:07pm
insights ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 9:07pm

pub async fn new(
registry: Arc<RwLock<Registry>>,
chain_ids: Vec<String>,
provider_addresses: Vec<Address>,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please take a vec of tuples as a single argument: chain_ids_and_providers: Vec<(String, Address)>

let mut writable_registry = registry.write().await;
let keeper_metrics = KeeperMetrics::default();

// Initialize metrics for each chain_id and provider_address pair
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this loop to the end of the method

please also leave a comment giving instructions to someone adding a new metric. they need to register the metric and add a get_or_create call in the loop

Co-Authored-By: Jayant Krishnamurthy <[email protected]>
@jayantk jayantk merged commit dd39029 into main Jan 31, 2025
9 checks passed
@jayantk jayantk deleted the devin/1738353116-init-keeper-metrics-with-chain-params branch January 31, 2025 22:00
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