m-lab / go

General purpose libraries / APIs for use in mlab code.
Apache License 2.0
5 stars 6 forks source link

Prometheusx version tracking needs improvement #45

Closed pboothe closed 5 years ago

pboothe commented 5 years ago

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.

pboothe commented 5 years ago

@stephen-soltesz in case you want to get to this before I do.

pboothe commented 5 years ago

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.

pboothe commented 5 years ago

Fixed by https://github.com/m-lab/go/pull/40

pboothe commented 5 years ago

Work is being tracked in https://github.com/m-lab/dev-tracker/issues/224

Closing this as a dupe.