mev-boost icon indicating copy to clipboard operation
mev-boost copied to clipboard

feat(issue-253): initial metrics implementation

Open 0xste opened this issue 1 year ago • 6 comments

📝 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

0xste avatar Sep 24 '24 13:09 0xste

Are you planning expose MEV Boost metrics?

n0price avatar Oct 04 '24 15:10 n0price

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

  1. Implement the standalone server on the new port and expose only default metrics about the go runtime
  2. Implement metrics for HTTP Server interaction
  3. Implement basic metrics for internal MEV details
  4. More advanced MEV statistics
  • https://github.com/flashbots/mev-boost/issues/253#issuecomment-2371122299

0xste avatar Oct 04 '24 19:10 0xste

Do you have a screenshot of all the metrics that are exported with this?

MariusVanDerWijden avatar Feb 04 '25 10:02 MariusVanDerWijden

Do you have a screenshot of all the metrics that are exported with this?

image

jtraglia avatar Feb 04 '25 14:02 jtraglia

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 🙏

0xste avatar Feb 04 '25 14:02 0xste

nice, thanks! could you please rebase @0xste ?

metachris avatar Aug 13 '25 12:08 metachris