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 GCE Request Count Metric #2150

Merged
merged 2 commits into from
May 31, 2023

Conversation

swetharepakula
Copy link
Member

Add GCE Request Count Metric that measures the number of requests the NEG Controller sends to the NEG API

/assign @gauravkghildiyal

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 25, 2023
@k8s-ci-robot k8s-ci-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. labels May 25, 2023
@swetharepakula
Copy link
Member Author

/hold a larger cleanup of the metrics is needed before this can go in

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 26, 2023
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 27, 2023
@swetharepakula
Copy link
Member Author

This is based on #2153 . I will rebase and remove hold once that is merged

@swetharepakula swetharepakula force-pushed the gce-request-count branch 3 times, most recently from df5e048 to 6440f54 Compare May 30, 2023 22:31
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 30, 2023
@swetharepakula
Copy link
Member Author

#2153 has merged, so removing hold
/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 30, 2023
func PublishGCERequestCountMetrics(start time.Time, requestType string, err error) {
result := getResult(err)
GCERequestLatency.WithLabelValues(requestType, result).Observe(time.Since(start).Seconds())
GCERequestCount.WithLabelValues(requestType, getResult(err)).Inc()
Copy link
Member

Choose a reason for hiding this comment

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

nit: Possible replacement: getResult(err) -> result

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, thanks for catching that!

@gauravkghildiyal
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 31, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gauravkghildiyal, swetharepakula

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 9c2baee into kubernetes:master May 31, 2023
k8s-ci-robot added a commit that referenced this pull request Mar 7, 2024
[Cherrypick #2153, #2177, #2150 into release-1.23] Add NEG count, GCERequest and GCE Latency Metrics
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. 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.

None yet

3 participants