Closed sideninja closed 1 month ago
[!CAUTION]
Review failed
The pull request is closed.
The changes introduce enhancements to the metrics collection system by adding a method for tracking operator balances in both the Collector
interface and the nopCollector
struct. The DefaultCollector
struct is updated to include a Prometheus gauge for the operator's balance. Additionally, relevant method calls are integrated into the EVM
struct's functionality, thereby improving the overall observability of account metrics.
Files | Change Summary |
---|---|
metrics/collector.go | Added OperatorBalance(account *flow.Account) method to Collector interface and DefaultCollector . Introduced operatorBalance Prometheus gauge in DefaultCollector . Updated NewCollector to initialize the gauge and set its value in the OperatorBalance method. |
metrics/nop.go | Added OperatorBalance(account *flow.Account) method to nopCollector , enhancing its interaction with Flow accounts. Included import for Flow SDK. |
services/requester/requester.go | Added e.collector.OperatorBalance(account) call in getSignerNetworkInfo method of EVM struct, updating control flow to include operator balance retrieval. |
sequenceDiagram
participant EVM
participant Collector
participant Account
EVM->>Collector: OperatorBalance(account)
Collector->>Account: Retrieve balance
Account-->>Collector: Return balance
Collector-->>EVM: Update operator balance
🐰 "In the meadow where numbers play,
A balance was added to brighten the day.
With collectors now keen,
And metrics so clean,
The rabbits hop high, come join in the fray!"
🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Description
Monitor operator wallet balance and report metrics. It should be configured to an alarm so the balance doesn't fall too low.
For contributor use:
master
branchFiles changed
in the Github PR explorerSummary by CodeRabbit
New Features
Bug Fixes