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

Migrate to Prometheus lib 1.x #7880

Open
wants to merge 17 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

Prometheus Java Metrics library development now focus on version 1.x, while we are still using the simple client version 0.16.
Since version 1.x introduced many changes and it is not compatible with 0.16, the upgrade is not straightforward and some refactoring is needed to migrate to the latest version, so I took the opportunity to also make the Prometheus code more OO.
The Prometheus HTTP server is not used instead of our custom implementation, so there is less effort to keep it updated, and we get by default improvement, like new export formats like protobuf.

See the CHANGELOG for the breaking changes introduced by this upgrade.

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 force-pushed the upgrade-prometheus-1.x branch 2 times, most recently from 52258c5 to f5c4ebf Compare November 13, 2024 19:41
@fab-10 fab-10 self-assigned this Nov 13, 2024
@fab-10 fab-10 force-pushed the upgrade-prometheus-1.x branch 4 times, most recently from 8c3c5ba to 3f13acf Compare November 19, 2024 14:49
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>

# Conflicts:
#	metrics/core/build.gradle
#	metrics/core/src/main/java/org/hyperledger/besu/metrics/noop/NoOpMetricsSystem.java
#	metrics/core/src/main/java/org/hyperledger/besu/metrics/opentelemetry/OpenTelemetrySystem.java
#	metrics/core/src/main/java/org/hyperledger/besu/metrics/prometheus/PrometheusMetricsSystem.java
#	metrics/rocksdb/src/main/java/org/hyperledger/besu/metrics/rocksdb/RocksDBStats.java
#	plugin-api/build.gradle
#	plugin-api/src/main/java/org/hyperledger/besu/plugin/services/MetricsSystem.java
# Conflicts:
#	ethereum/core/src/main/java/org/hyperledger/besu/ethereum/chain/DefaultBlockchain.java
#	metrics/core/build.gradle
#	metrics/core/src/main/java/org/hyperledger/besu/metrics/prometheus/PrometheusMetricsSystem.java
# Conflicts:
#	CHANGELOG.md
#	metrics/core/src/main/java/org/hyperledger/besu/metrics/prometheus/PrometheusMetricsSystem.java
#	metrics/core/src/main/java/org/hyperledger/besu/metrics/prometheus/PrometheusSuppliedValueCollector.java
@fab-10 fab-10 force-pushed the upgrade-prometheus-1.x branch 2 times, most recently from 591a123 to 553b8ee Compare November 20, 2024 18:19
# Conflicts:
#	CHANGELOG.md
#	metrics/core/src/main/java/org/hyperledger/besu/metrics/prometheus/PrometheusMetricsSystem.java
#	metrics/core/src/main/java/org/hyperledger/besu/metrics/prometheus/PrometheusSuppliedValueCollector.java
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
@fab-10 fab-10 marked this pull request as ready for review November 22, 2024 15:00
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.

1 participant