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

Add support for counter metric with external supplied value #7894

Merged
merged 3 commits into from
Nov 20, 2024

Conversation

fab-10
Copy link
Contributor

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

PR description

Another PR of the series to upgrade and refresh the metric system.
This time we fix the type of two metrics used in the MonitoredExecutors class, that are counters but were created as gauges, probably since there was no way to create counters with an external supplied value, so this kind of counter has been added, and the concept of metrics with external supplied values has been extended to cover both counters and gauges.

Other than for using the correct metric type, this fix is required, because with the following upgrade to Prometheus Java lib 1.x, only counters can have a _total suffix.

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 self-assigned this Nov 20, 2024
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the labelled-supplied-metric branch from 5fadbba to d8ffff4 Compare November 20, 2024 13:58
@fab-10 fab-10 marked this pull request as ready for review November 20, 2024 14:20
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 merged commit fe46289 into hyperledger:main Nov 20, 2024
43 checks passed
jflo pushed a commit to jflo/besu that referenced this pull request Nov 22, 2024
…ger#7894)

* Add support for counter metric with external supplied value

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Update CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
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