Skip to content
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

Add buildrunname label for custom metric #467

Merged
merged 2 commits into from
Nov 12, 2020
Merged

Add buildrunname label for custom metric #467

merged 2 commits into from
Nov 12, 2020

Conversation

zhangtbj
Copy link
Contributor

@zhangtbj zhangtbj commented Nov 5, 2020

For the current custom metric, we have two labels: buildStrategy and namespace and we can configure to the controller deployment choose which label we want to collect.

At the beginning, we just have two labels: buildStrategy and namespace because the metric limitation in Sysdig system, but it is not the limitation for other monitoring system and the buildrunname label is also important so that the end user can know more detail about each buildrun status.

By default the default label is still buildStrategy, but after this PR, the end user can have the capability to choose one more label in custom metric to show more detail.

@qu1queee
Copy link
Contributor

qu1queee commented Nov 9, 2020

@zhangtbj sorry, I almost missed this PR; let me review tomorrow.

@zhangtbj
Copy link
Contributor Author

Thanks!

Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To have a consistent naming schema, the label would be buildrun without the name suffix.

Be aware that within our IBM Code Engine solution, we cannot use this new label, see the very last line in our internal ADR 6.

@zhangtbj
Copy link
Contributor Author

Hi Sascha,

Yes, it is a CodeEngine or sysdig limitation, but for prometheus or other monitoring systems, it is not a limitation and we should allow end user to see the metric about buildrun name.

I didn't choose to use name because I found maybe in future, there will be multiple names in metrics, like build name or buildrun name, if we use name directly, it is hard to say which name is

@zhangtbj
Copy link
Contributor Author

Sorry, I mis-understood the comment.

Yes, I think change the label from buildrunname to buildrun make more sense.

I will change it later. Thanks Sascha!

@qu1queee
Copy link
Contributor

qu1queee commented Nov 10, 2020

@zhangtbj pr looks good, and @SaschaSchwarze0 requested changes should be addressed, +1. I might be having the full context on this PR, which is allow users that might have their own sysdig instance to get metrics based on:

  • namespace
  • buildstrategy

but also on:

  • buildruns

I´m not fully understanding the advantage of introducing "buildrun" . E.g. if you want to estimate an average on builds based on buildstrategy, then buildstrategy is a solid use case. I think same applies for the namespace. For buildruns as they are are always a single entity(e.g. one buildrun at a time), I´m struggling to see the concrete use case, can you provide that pls.

Copy link
Contributor

@qu1queee qu1queee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asking for more clarification on the use case behind this new label. See my above comment.

@zhangtbj
Copy link
Contributor Author

Yes,

I think two reasons:

  • We should allow end user to filter what they would like to see, buildrun is the detail of one build, it is an option and we should open it, we didn't open it before is because sydig cannot handle too many metrics by multiple labels, but like Tekton taskrun metric, there are several label so that end user can monitor from different level
  • namespace and buildstrategy label are for statistics, but if an end user wants to know which buildrun take longer time, or if there are several buildrun failures, the end user can know the buildrun names and check the buildrun failure directly.

@zhangtbj
Copy link
Contributor Author

Change the label name from buildruname to buildrun in the second commit: 76d3882

@qu1queee
Copy link
Contributor

qu1queee commented Nov 12, 2020

Ok, I see the use case on seeing all buildruns per namespace in sysdig. I guess that will help. I would have squash your commits, while renaming something that appeared on this PR doesnt needs another commit, but for you to decide @zhangtbj

Copy link
Contributor

@qu1queee qu1queee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@SaschaSchwarze0 SaschaSchwarze0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should maybe then also add build in another PR to complete the picture.

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 12, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SaschaSchwarze0

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 12, 2020
@openshift-merge-robot openshift-merge-robot merged commit 3036828 into shipwright-io:master Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants