-
Notifications
You must be signed in to change notification settings - Fork 44
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
[metric] #3 Reset the declared_resources metric when at a new commit [restored] #1232
[metric] #3 Reset the declared_resources metric when at a new commit [restored] #1232
Conversation
a770ea3
to
55a2b91
Compare
Context of using rate() instead of present_over_time() in PromQL: prometheus/prometheus#8255 the first proposal of adding a present_over_time() function to represent if a timeserie exists in the time frame. In our case the error metrics (i.e. resource_fights_total) will always exist even though the value of it does not change when no resource fights are happening, which will make the present_over_time() always returning 1 http://screen/4wdqXrJqAUFP7PZ. Using rate() instead can give us an idea whether a fight was recorded within the queried time frame - if no fights are recorded, the record rate should go back to 0. |
55a2b91
to
98842b4
Compare
1add856
to
75eb21f
Compare
75eb21f
to
a8bf124
Compare
/retest-required |
a8bf124
to
9e56ab0
Compare
9e56ab0
to
363a3e4
Compare
363a3e4
to
6a5749e
Compare
6a5749e
to
603d881
Compare
/retest-required |
pkg/declared/resources.go
Outdated
metrics.RecordDeclaredResources(ctx, r.previousCommit, 0) | ||
} | ||
|
||
r.mutex.Lock() |
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.
just move these to the top of the method:
r.mutex.Lock()
defer r.mutex.Unlock()
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.
Hmm yeah just did and tried with the same failing test, still not helping. TestDontDeleteAllNamespaces
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.
Oh it's the order of deleteNS and update members. This time it should work.
…mit updates The current OpenCensus library keeps a metric stream that is uniquely identified by commit alive even though no new values are issued. This makes the Otel Collector metricstransform processor receives all time value when calculating the max and gives false output. The temporary work around is to reset the stream of previous commit to 0 when parser sees new commit. b/321875474
603d881
to
54a0df3
Compare
/retest-required |
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: karlkfi 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 |
6163281
into
GoogleContainerTools:main
…mit updates (GoogleContainerTools#1232) The current OpenCensus library keeps a metric stream that is uniquely identified by commit alive even though no new values are issued. This makes the Otel Collector metricstransform processor receives all time value when calculating the max and gives false output. The temporary work around is to reset the stream of previous commit to 0 when parser sees new commit. b/321875474
…when commit updates (GoogleContainerTools#1232)" This reverts commit 6163281.
The fix GoogleContainerTools#1232 only affects declared_resources from Config Sync. The metric from RG controller may take longer to be ready. Skip checking for those target values for now.
The fix GoogleContainerTools#1232 only affects declared_resources from Config Sync. The metric from RG controller may take longer to be ready. Skip checking for those target values for now.
The fix #1232 only affects declared_resources from Config Sync. The metric from RG controller may take longer to be ready. Skip checking for those target values for now.
…mit updates (GoogleContainerTools#1232) The current OpenCensus library keeps a metric stream that is uniquely identified by commit alive even though no new values are issued. This makes the Otel Collector metricstransform processor receives all time value when calculating the max and gives false output. The temporary work around is to reset the stream of previous commit to 0 when parser sees new commit. b/321875474
The fix GoogleContainerTools#1232 only affects declared_resources from Config Sync. The metric from RG controller may take longer to be ready. Skip checking for those target values for now.
…ix (#1232) (#1254) * [metric] #3 Reset declared_resource to 0 when commit updates (#1232) The current OpenCensus library keeps a metric stream that is uniquely identified by commit alive even though no new values are issued. This makes the Otel Collector metricstransform processor receives all time value when calculating the max and gives false output. The temporary work around is to reset the stream of previous commit to 0 when parser sees new commit. b/321875474 * Use default timeout for metric value check (#1264) * test: Only check declared_resources metric (#1268) The fix #1232 only affects declared_resources from Config Sync. The metric from RG controller may take longer to be ready. Skip checking for those target values for now.
The current OpenCensus library keeps a metric stream that is uniquely identified by commit alive even though no new values are issued.
This makes the Otel Collector metricstransform processor receives all time value when calculating the max and gives false output.
The temporary work around is to reset the stream of previous commit to 0 when parser sees new commit.
b/321875474
See the falsely closed PR #1219 for context.