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

feat: add ipfs version info to prometheus metrics #6688

Merged
merged 1 commit into from
Sep 30, 2019

Conversation

olizilla
Copy link
Member

@olizilla olizilla commented Sep 30, 2019

Adds ipfs_info prometheus metric with version and commit info to http://localhost:5001/debug/metrics/prometheus output...

# HELP ipfs_info IPFS version information.
# TYPE ipfs_info gauge
ipfs_info{commit="9ea7c6a11-dirty",version="0.5.0-dev"} 1

This follows the same pattern as go and other systems, adding a gauge metric that is set to 1, with the version info added as labels.

This is a common pattern for prometheus. It lets operators merge version info into other prometheus metrics by multiplying it with the other stat. As the value is always 1, it simply adds the labels to the aggregated info but does not change the other stats value... as described in https://www.robustperception.io/exposing-the-software-version-to-prometheus

For example, we already expose the go version info as

# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.12.9"} 1

Part of #5604

License: MIT
Signed-off-by: Oli Evans oli@tableflip.io

Adds `ipfs_info` prometheus metric with version and commit info

```prometheus
ipfs_info{commit="9ea7c6a11-dirty",version="0.5.0-dev"} 1
```

This follows the same pattern as go and other systems, adding a gauge metric that is set to 1, with the version info addeds as labels.

This is a common pattern for prometheus. It lets operators merge version info into other prometheus metrics by multiplying it with the other stat, as described in https://www.robustperception.io/exposing-the-software-version-to-prometheus

For example, we already expose the go version info as

```prometheus
go_info{version="go1.12.9"} 1
```

License: MIT
Signed-off-by: Oli Evans <oli@tableflip.io>
@Stebalien Stebalien merged commit 0343148 into master Sep 30, 2019
@Stebalien Stebalien deleted the ipfs-info-prometheus-metric branch September 30, 2019 17:09
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.

3 participants