Closed pboothe closed 5 years ago
@stephen-soltesz in case you want to get to this before I do.
Talking in person, we need to think about this very carefully. The commit hash seems like a property of the code, so it makes sense to put it in the binary. The tag is a property of the repo, so it should likely NOT be baked into the binary.
Fixed by https://github.com/m-lab/go/pull/40
Work is being tracked in https://github.com/m-lab/dev-tracker/issues/224
Closing this as a dupe.
See https://github.com/m-lab/ndt-server/issues/93 for the use case.
But the upshot is: We should have a single string variable, set to the output of
git describe --long
and then parse that output into its three component parts (tag, commit count, commit ID), use each of the component parts as a label for the metric, and then set the value of the metric to be the commit ID, interpreted as a base-16 integer, converted into a prometheus-compatible float64.