feat(issue-253): initial metrics implementation
📝 Summary
An initial prometheus http server exposed optionally on a custom port if flag is provided at runtime.
⛱ Motivation and Context
As per discussion on: https://github.com/flashbots/mev-boost/pull/294#issuecomment-1271171387 i've reduced the scope of the change to be as minimal as possible and look to incrementally add additional metrics over time to de-risk the implementation
Following the step 1 recommendation on: https://github.com/flashbots/mev-boost/issues/253#issuecomment-2371122299
📚 References
https://github.com/flashbots/mev-boost/issues/253
✅ I have run these commands
- [x]
make lint - [x]
make test-race - [x]
go mod tidy
Are you planning expose MEV Boost metrics?
Are you planning expose MEV Boost metrics?
Yes! i'd proposed a full integration that was rejected here a while back https://github.com/flashbots/mev-boost/pull/294 on the grounds of the changes being too deep into the codebase
These changes are deep and extensive into the core system and logic. Considering that mev-boost is run at 50% of all validators, it is too risky and impactful for adding a large amount of new logic in the core flows at the current time. Perhaps consider collecting the metrics from the logs, or thinking about a possible plugin interface. 🤔
- https://github.com/flashbots/mev-boost/pull/294#issuecomment-1271171387
This MR is step 1 of the recommendation instrumentation is introduced gradually to reduce operator risk
I propose we implement this change in stages to de-risk the implementation
- Implement the standalone server on the new port and expose only default metrics about the go runtime
- Implement metrics for HTTP Server interaction
- Implement basic metrics for internal MEV details
- More advanced MEV statistics
- https://github.com/flashbots/mev-boost/issues/253#issuecomment-2371122299
Do you have a screenshot of all the metrics that are exported with this?
Do you have a screenshot of all the metrics that are exported with this?
Hey @0xste, this seems like a reasonable first step! Thanks. I've made some changes, please review if/when you have time.
Looks good to me, beat me to the screenshot, thanks 🙏
nice, thanks! could you please rebase @0xste ?