-
Notifications
You must be signed in to change notification settings - Fork 226
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
chore: init KeeperMetrics with chain_id and provider_address, bump version #2318
Conversation
…rsion Co-Authored-By: Jayant Krishnamurthy <[email protected]>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
⚙️ Control Options:
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
Co-Authored-By: Jayant Krishnamurthy <[email protected]>
Co-Authored-By: Jayant Krishnamurthy <[email protected]>
apps/fortuna/src/keeper.rs
Outdated
pub async fn new( | ||
registry: Arc<RwLock<Registry>>, | ||
chain_ids: Vec<String>, | ||
provider_addresses: Vec<Address>, |
There was a problem hiding this comment.
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)>
apps/fortuna/src/keeper.rs
Outdated
let mut writable_registry = registry.write().await; | ||
let keeper_metrics = KeeperMetrics::default(); | ||
|
||
// Initialize metrics for each chain_id and provider_address pair |
There was a problem hiding this comment.
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]>
Co-Authored-By: Jayant Krishnamurthy <[email protected]>
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:
Link to Devin run: https://app.devin.ai/sessions/6db704545ae34e178633b42fefb736b5