internal/cmd: add build info metric in helm/ansible operators#4220
Conversation
1afcedf to
9f308ed
Compare
9f308ed to
dfc774c
Compare
estroz
left a comment
There was a problem hiding this comment.
I do have a slight concern about including the git commit as a metric, but I expect most operators to be using a released version of <ansible|helm>-operator so this value will likely not explode in-cluster.
/lgtm
| ) | ||
| ) | ||
|
|
||
| func RegisterBuildInfo(r prometheus.Registerer) { |
There was a problem hiding this comment.
@joelanford just a nit. Could you please add a comment here in this method before we get it merged?
| func RegisterBuildInfo(r prometheus.Registerer) { | |
| // RegisterBuildInfo ... | |
| func RegisterBuildInfo(r prometheus.Registerer) { |
There was a problem hiding this comment.
I'm going to go ahead and merge without these comments since CI already passed. If I push to this branch again, this PR will get stuck (we're currently out of Travis CI build credits).
|
@estroz I think the git commit hash is okay. Prometheus itself does this: https://www.robustperception.io/exposing-the-software-version-to-prometheus |
…or-framework#4220) Signed-off-by: reinvantveer <rein.van.t.veer@geodan.nl>
Description of the change:
Added the
ansible_operator_build_infoandhelm_operator_build_infometrics to instrument commit and version information for the Ansible and Helm operators, respectively.Motivation for the change:
Expose runtime version information to augment stamp versions in bundle and CSV metadata.
Checklist
If the pull request includes user-facing changes, extra documentation is required:
changelog/fragments(seechangelog/fragments/00-template.yaml)website/content/en/docs