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 'apiserver_watch_events_total' metric. #78732

Merged
merged 1 commit into from Jul 4, 2019

Conversation

@mborsz
Copy link
Member

commented Jun 5, 2019

What type of PR is this?
/kind feature

What this PR does / why we need it:
This adds 'apiserver_watch_events_total' metric which is incremented each time we send some event in watch.

We found this metric useful to understand the CPU usage of the kube-apiserver process.

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

Added a metric 'apiserver_watch_events_total' that can be used to understand the number of watch events in the system.
@fedebongio

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

@fedebongio: GitHub didn't allow me to request PR reviews from the following users: connor1989.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/assign @logicalhan @roycaihw
/cc @wojtek-t @jpbetz @connor1989

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.

@fedebongio

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2019

@wojtek-t wojtek-t self-assigned this Jun 28, 2019

WatchEvents = prometheus.NewCounterVec(
prometheus.CounterOpts{
Name: "apiserver_watch_events_total",
Help: "Number of events in watches for a given resources",

This comment has been minimized.

Copy link
@jpbetz

jpbetz Jun 28, 2019

Contributor

I bit more context in the help string might be useful, e..g "Number of events send to clients" ?

"for a given resources" might not be needed here? If a metric consumer filters by the labels they get per-resource, but if not they get the grand total.

This comment has been minimized.

Copy link
@mborsz

mborsz Jul 1, 2019

Author Member

I corrected the help text. Please let me know if you find the new version more readable.

@jpbetz

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2019

@k8s-ci-robot k8s-ci-robot requested a review from logicalhan Jun 28, 2019

Add 'apiserver_watch_events_total' metric.
We found this metric useful to understand the CPU usage of the
kube-apiserver process.

@mborsz mborsz force-pushed the mborsz:metric branch from 8782a62 to 58d3338 Jul 1, 2019

@mborsz

This comment has been minimized.

Copy link
Member Author

commented Jul 2, 2019

I corrected the help text. PTAL.

@wojtek-t

This comment has been minimized.

Copy link
Member

commented Jul 4, 2019

/lgtm
/approve

We can improve help message in the follow-up if needed.

@k8s-ci-robot k8s-ci-robot added the lgtm label Jul 4, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

commented Jul 4, 2019

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@k8s-ci-robot k8s-ci-robot merged commit 74b5603 into kubernetes:master Jul 4, 2019

23 checks passed

cla/linuxfoundation mborsz authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-dependencies Job succeeded.
Details
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-csi-serial Skipped.
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-e2e-gce-iscsi Skipped.
pull-kubernetes-e2e-gce-iscsi-serial Skipped.
pull-kubernetes-e2e-gce-storage-slow Skipped.
pull-kubernetes-godeps Skipped.
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-node-e2e-containerd Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.