Skip to content

Commit

Permalink
Add process_release metric. (hyperledger#3997)
Browse files Browse the repository at this point in the history
* Add process_info metric.

Signed-off-by: Jim McDonald <Jim@mcdee.net>

* Updated changelog with version metric.

Signed-off-by: Jim McDonald <Jim@mcdee.net>
  • Loading branch information
mcdee authored Jun 23, 2022
1 parent 5ee9be8 commit 87eb4d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## 22.7.1

### Additions and Improvements
- Version information available in metrics [#3997](https://github.com/hyperledger/besu/pull/3997)

### Bug Fixes
- Fixed a snapsync issue that can sometimes block the healing step [#3920](https://github.com/hyperledger/besu/pull/3920)

Expand Down
9 changes: 9 additions & 0 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,7 @@ public void run() {

startPlugins();
validatePluginOptions();
setReleaseMetrics();
preSynchronization();

runner.startEthereumMainLoop();
Expand Down Expand Up @@ -1671,6 +1672,14 @@ private void validatePluginOptions() {
}
}

private void setReleaseMetrics() {
metricsSystem
.get()
.createLabelledGauge(
StandardMetricCategory.PROCESS, "release", "Release information", "version")
.labels(() -> 1, BesuInfo.version());
}

public void configureLogging(final boolean announce) {
// To change the configuration if color was enabled/disabled
Log4j2ConfiguratorUtil.reconfigure();
Expand Down

0 comments on commit 87eb4d5

Please sign in to comment.