-
Couldn't load subscription status.
- Fork 677
add metric for per-cpu, per-stage timing #516
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
|
/assign @vteratipally |
|
/lgtm |
|
/assign @Random-Liu |
| if cc.mSystemProcsBlocked == nil { | ||
| return | ||
| } | ||
| if cc.mSystemInterruptsTotal == nil { |
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.
will the cpu_collector break if the config is not applied?
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.
No - this is a nil check for the metric (as opposed to the config). The metric will only be initialized if the config is provided:
node-problem-detector/pkg/systemstatsmonitor/system_stats_monitor.go
Lines 79 to 81 in 1a7aa65
| if len(ssm.config.CPUConfig.MetricsConfigs) > 0 { | |
| ssm.cpuCollector = NewCPUCollectorOrDie(&ssm.config.CPUConfig) | |
| } |
So this will always evaluate to false.
| } | ||
|
|
||
| func NewCPUCollectorOrDie(cpuConfig *ssmtypes.CPUStatsConfig) *cpuCollector { | ||
| cc := cpuCollector{tags: map[string]string{}, config: cpuConfig} |
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.
Why removing the kernel and os labels? Can you explain it in the PR description?
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.
Ah I meant to but forgot amongst oncall chaos. :) Will add now
|
In theory removing labels may cause potential backward compatibility issues? |
|
In theory yes, however these schemas were not used. |
However, we don't know whether they are used by some OSS users. In theory, it is possible that someone is using it. We don't have deprecation policy defined for the metrics today. Let's at least leave it one release. We can announce deprecation for those labels first in the next release, and remove them in the future. We should file an issue to track that, so that we don't forget about it when we cut the next release. |
|
I suggest the following:
How does that sound? |
I think you can at least separate the label removal from the new metrics change. We don't need to block the new metrics because of the label removal. |
|
Done |
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: karan, Random-Liu, vteratipally 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 |
Tested on a COS VM: