Skip to content
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

Consolidate all metric collectors into the metrics system #7877

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Nov 13, 2024

PR description

Built on top of #7879 [MERGED]

This is the first PR of a series to refresh the metrics system, to pay some tech debt, and to migrate to the new Prometheus Java lib to version 1.x, from the current legacy Simpleclient version 0.x.

Along with the upgrade to the new Prometheus lib, these other tasks are planned to refresh the metrics system:

  • Refactor the way the observation mechanism works to simplify it and make it more OO
  • Replace our HTTP server implementation with the provided one, so we can benefit from the new export formats (like protobuf) without having to re-implement them
  • Use Prometheus to provide OpenTelemetry metrics, and so remove the dedicated OpenTelemetry deps and code
  • Add support for Histogram and Summary metric types.

The scope of this first PR is to consolidate all metric collectors in the metrics system, since with the time, something has spilled out of it, in particular RocksDB internal metrics and Guava cache metrics collectors were created outside the metric system, with the assumption to only support Prometheus as backend.

Both those collectors have been moved into the metrics system, and the ability to add custom collectors from outside the metrics system has been removed.

There are no functional changes or fixes in this PR only refactoring, so no support for the refactored collectors have been implemented for OpenTelemetry, since there was no support before, and since the idea is to use Prometheus to provide OpenTelemetry in a future PR.

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@fab-10 fab-10 marked this pull request as ready for review November 13, 2024 15:43
@fab-10 fab-10 self-assigned this Nov 13, 2024
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 mentioned this pull request Nov 15, 2024
8 tasks
Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, that sounds like a good development

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants