-
Notifications
You must be signed in to change notification settings - Fork 42.1k
Remove reflector metrics since they are causing a memory leak #74636
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
Conversation
|
I agree, we need to be more judicious because these are generally low value relative to other metrics and are not targeted like our other metrics. |
|
I'm in favor as well. If there are targeted metrics we want for fixed informers, we could add them in the future, but the impact of these (e.g. #73587) far outweighs any benefit. cc @kubernetes/sig-instrumentation-pr-reviews |
|
/cc @brancz |
72707b9 to
ca096f8
Compare
|
/test pull-kubernetes-bazel-test pull-kubernetes-integration |
| defer r.lastSyncResourceVersionMutex.Unlock() | ||
| r.lastSyncResourceVersion = v | ||
|
|
||
| rv, err := strconv.Atoi(v) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this removed code is even worse than expected. Good call.
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lavalamp, logicalhan The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/test pull-kubernetes-integration |
|
/lgtm Thanks! |
|
This is the second time these have caused a leak, so I welcome this 👍 |
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
This was removed upstream because of memory leak: xref: kubernetes/kubernetes#74636 xref: kubernetes/kubernetes#75700
|
I'm using promtheus-operator verison 5.3.8 and promethues 2.14.0 and still can see in the http://localhost:9090/status the following :
I thought these metrics were excluded in all versions after 2.12.6 or am I wrong? I also tried to exclude these metrics by adding, but it seems to be not working ...
|
|
It depends on your kubernetes version whether you may still have these, and metric relabeling would need to be done in the scrape config/ServiceMonitor that configures the target that these come from. |
|
hi @brancz , I'm using version v1.12.3 on k8s |
|
Yes in 1.12 those are still present, so you need to drop the metrics on the component ServiceMonitors that expose them. |
The reflector metrics were removed in kubernetes#74636. This code is not used anymore.
Reflector metrics were removed in Kubernetes due to them causing memory leaks: kubernetes/kubernetes#74636 Signed-off-by: João Vilaça <[email protected]>
Reflector metrics were removed in Kubernetes due to them causing memory leaks: kubernetes/kubernetes#74636 Signed-off-by: João Vilaça <[email protected]>
What type of PR is this?
/kind bug
What this PR does / why we need it:
Currently, our reflector metrics are a memory leak. While this has always been true (for these metrics), this has been exacerbated by the increased watches introduced by #64752. For now, let's just remove these metrics since (I think) no one wants a memory leak. This should be safe because it would not have been possible to have set up reliable monitoring around these metrics since the label names are unstable (as documented).
Which issue(s) this PR fixes:
Fixes #73587
Does this PR introduce a user-facing change?:
/sig api-machinery instrumentation
/cc @wojtek-t @lavalamp @liggitt