lukasmalkmus / rpi_exporter

A Raspberry Pi CPU temperature exporter.
Apache License 2.0
78 stars 17 forks source link

Exporter doesn't show version in build_info metric #8

Closed paulfantom closed 4 years ago

paulfantom commented 5 years ago

Currently (tarball from release 0.6.0) exporter shows metric:

rpi_exporter_build_info{branch="",goversion="go1.12.7",revision="",version=""} 1

which doesn't populate either branch nor version labels. It would be nice if at least version was exposed.

paulfantom commented 5 years ago

This can be done by properly implementing https://godoc.org/github.com/prometheus/client_golang/prometheus#NewBuildInfoCollector with conjunction of -X build variables (those are usually set by promu).

lukasmalkmus commented 4 years ago

When transitioning to go modules I forgot to correctly address the version package. This has been fixed with a recent commit and will be included in a release I cut very soon.