-
Notifications
You must be signed in to change notification settings - Fork 5
add mevboostmetric #23
base: master
Are you sure you want to change the base?
Conversation
package.json
Outdated
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.
this is unecessary, all the dependencies needed for "stakers-metrics" should be inside ./stakers-metrics" directory. There is already a package.json there, feel free to add whatever dependencies you need in that file
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.
Done, package.json deleted
package-lock.json
Outdated
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.
this is unnecessary, this project is built with yarn instead of npm, and all dependencies should be installed inside their respective directories, not in the base directory.
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.
Done, paackge-lock.json deleted
yarn.lock
Outdated
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.
same as the other 2 related comments, there is already a yarn.lock file inside ./stakers-metrics dir
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.
Done, yarn.lock deleted
stakers-metrics/src/metrics.ts
Outdated
| } | ||
|
|
||
| async function collectMevBoostMetric(network: typeof networks[number]) { | ||
| console.log(`Collecting MEV Boost metric for network: ${network}`); |
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.
2 things:
- we use
loggerinstead of console for logging purposes in this project - there is no need to log anything while collecting the metric if there are no errors
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.
Done, logs deleted
stakers-metrics/src/metrics.ts
Outdated
| const envKey = `_DAPPNODE_GLOBAL_MEVBOOST_${network.toUpperCase()}`; | ||
|
|
||
| const mevBoostValue = process.env[envKey]; | ||
| logger.info(`MEV Boost value for network ${network}: ${mevBoostValue}`); |
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.
same as above
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.
Done logs deleted
Added a new metric that indicates the mevboost value of each network.