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

Cleanup NEG Metrics #2153

Merged
merged 3 commits into from
May 30, 2023
Merged

Conversation

swetharepakula
Copy link
Member

@swetharepakula swetharepakula commented May 26, 2023

  • Move metrics around to be easier to find
  • Have package separation between metrics. Mainly to reduce dependencies on the main metrics package so that can be used to publish metrics in negtypes (I will be adding metrics as part of Add GCE Request Count Metric #2150)

 * removal of constants makes reading the metric definition easier
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels May 26, 2023
@k8s-ci-robot k8s-ci-robot requested review from aojea and code-elinka May 26, 2023 23:06
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 26, 2023
@swetharepakula
Copy link
Member Author

/assign @gauravkghildiyal

/cc @sawsa307
/cc @songrx1997

@k8s-ci-robot
Copy link
Contributor

@swetharepakula: GitHub didn't allow me to request PR reviews from the following users: songrx1997, sawsa307.

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

In response to this:

/assign @gauravkghildiyal

/cc @sawsa307
/cc @songrx1997

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.

pkg/neg/controller.go Outdated Show resolved Hide resolved
Copy link
Member

@gauravkghildiyal gauravkghildiyal left a comment

Choose a reason for hiding this comment

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

Super helpful PR! Love the removal of that pile of unnecessary constants :)

pkg/neg/metrics/metricscollector/metrics_test.go Outdated Show resolved Hide resolved
pkg/neg/metrics/metricscollector/neg_metrics_collector.go Outdated Show resolved Hide resolved
pkg/neg/metrics/metricscollector/neg_metrics_collector.go Outdated Show resolved Hide resolved
 * all gauge metrics that require state are moved to syncer_metrics.go
   are published by the metrics collector

 * all metrics that do not require state and not emitted by the metrics
   collector
 * metricscollector depends on negtypes therefore pull this into its own
   package

 * this separation will help when adding metrics that need to go into
   the negtypes package

 * register the metrics for each package separately to ensure isolation
   between the packages
@gauravkghildiyal
Copy link
Member

Thanks!

/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 30, 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

@swetharepakula
Copy link
Member Author

/retest

verification failed in downloading go dependencies for the linter and not related to the PR

@k8s-ci-robot k8s-ci-robot merged commit 2c89f80 into kubernetes:master May 30, 2023
@swetharepakula swetharepakula deleted the cleanup-neg-metrics branch May 30, 2023 22:29
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants