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

Subresources are not included in apiserver prometheus metrics #46354

Merged

Conversation

smarterclayton
Copy link
Contributor

@smarterclayton smarterclayton commented May 24, 2017

Subresources are very often completely different code paths and errors
generated on those code paths are important to distinguish.

@kubernetes/sig-api-machinery-pr-reviews

The Prometheus metrics for the kube-apiserver for tracking incoming API requests and latencies now return the `subresource` label for correctly attributing the type of API call.

@k8s-ci-robot k8s-ci-robot added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels May 24, 2017
@k8s-github-robot k8s-github-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. release-note-label-needed labels May 24, 2017
@caesarxuchao
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 24, 2017
@k8s-github-robot k8s-github-robot added do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-label-needed labels May 24, 2017
@smarterclayton smarterclayton removed the do-not-merge DEPRECATED. Indicates that a PR should not merge. Label can only be manually applied/removed. label May 24, 2017
@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 24, 2017
@caesarxuchao caesarxuchao added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels May 24, 2017
@wojtek-t
Copy link
Member

I'm wondering if we will need to adjust our tests (I don't remember what exactly and how they are checking).
@gmarek @shyamjvs ^^

@shyamjvs
Copy link
Member

shyamjvs commented May 24, 2017

We currently are getting the request latencies labelled by just (verb, resource) pair.. Now we also have subresource.
So we need to change the APICall struct also to have this new field (https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/metrics_util.go#L190).
Otherwise we'll set the values of the percentiles to just the last subresource's metric for a given (verb, resource) pair among all subresources (https://github.com/kubernetes/kubernetes/blob/master/test/e2e/framework/metrics_util.go#L305).

@smarterclayton Could you also update that logic as part of this PR? I'm happy to do that as well.

@smarterclayton smarterclayton removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 24, 2017
@smarterclayton
Copy link
Contributor Author

Ok.

Subresources are very often completely different code paths and errors
generated on those code paths are important to distinguish.
@smarterclayton
Copy link
Contributor Author

Updated with metrics.

@shyamjvs
Copy link
Member

Thanks for updating!
@gmarek This calls for benchmark, perfdash (and compare) to get updated yet again :)

@smarterclayton
Copy link
Contributor Author

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this

@smarterclayton
Copy link
Contributor Author

@k8s-bot pull-kubernetes-e2e-gce-etcd3 test this

hates me

@wojtek-t
Copy link
Member

Thanks @smarterclayton

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 25, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caesarxuchao, smarterclayton, wojtek-t

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 45573, 46354, 46376, 46162, 46366)

@k8s-github-robot k8s-github-robot merged commit 23348ce into kubernetes:master May 25, 2017
@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented May 25, 2017

@smarterclayton: The following test(s) failed:

Test name Commit Details Rerun command
pull-kubernetes-e2e-kops-aws ad431c4 link @k8s-bot pull-kubernetes-e2e-kops-aws test this
pull-kubernetes-federation-e2e-gce ad431c4 link @k8s-bot pull-kubernetes-federation-e2e-gce test this

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

k8s-github-robot pushed a commit that referenced this pull request May 29, 2017
Automatic merge from submit-queue

Fix minor bugs in setting API call metrics with subresource

Based on changes from #46354

/cc @wojtek-t @smarterclayton
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants