-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
internal/cmd: add build info metric in helm/ansible operators #4220
internal/cmd: add build info metric in helm/ansible operators #4220
Conversation
1afcedf
to
9f308ed
Compare
9f308ed
to
dfc774c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
) | ||
) | ||
|
||
func RegisterBuildInfo(r prometheus.Registerer) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
…or-framework#4220) Signed-off-by: rearl <rearl@secureworks.com>
Description of the change:
Added the
ansible_operator_build_info
andhelm_operator_build_info
metrics 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