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

[Merged by Bors] - Add Lighthouse version and commit hash to Prometheus metrics #2427

Closed
wants to merge 2 commits into from

Conversation

macladson
Copy link
Member

Issue Addressed

#2225

Proposed Changes

Exposes the version given from the lighthouse_version crate to the Prometheus metrics server.

Additional Info

  • This metric appears in both the Beacon Node and Validator Client metrics servers.
  • This is the simplest solution. It might be better to include the version and commit hash as separate labels rather than combined, however this would be more involved. Happy to do it that way if this is too cumbersome to use.
  • The metric appears as:
# HELP lighthouse_info The build of Lighthouse running on the server
# TYPE lighthouse_info gauge
lighthouse_info{version="Lighthouse/v1.4.0-379664a+"} 1

@macladson macladson added the ready-for-review The code is ready for review label Jul 1, 2021
Copy link
Member

@michaelsproul michaelsproul left a comment

Choose a reason for hiding this comment

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

Perfect!

bors r+

@michaelsproul michaelsproul added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Jul 2, 2021
bors bot pushed a commit that referenced this pull request Jul 2, 2021
## Issue Addressed

#2225 

## Proposed Changes

Exposes the version given from the `lighthouse_version` crate to the Prometheus metrics server.

## Additional Info

- This metric appears in both the Beacon Node and Validator Client metrics servers.
- This is the simplest solution. It might be better to include the version and commit hash as separate labels rather than combined, however this would be more involved. Happy to do it that way if this is too cumbersome to use.
- The metric appears as:
```
# HELP lighthouse_info The build of Lighthouse running on the server
# TYPE lighthouse_info gauge
lighthouse_info{version="Lighthouse/v1.4.0-379664a+"} 1
```
@bors bors bot changed the title Add Lighthouse version and commit hash to Prometheus metrics [Merged by Bors] - Add Lighthouse version and commit hash to Prometheus metrics Jul 2, 2021
@bors bors bot closed this Jul 2, 2021
@macladson macladson deleted the bn-version-metric branch July 2, 2021 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants