-
Notifications
You must be signed in to change notification settings - Fork 115
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
go/registry/metrics: Runtimes metrics: query for runtimes #3161
Conversation
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.
One downside here is that this will cause the query to be issued every 10 seconds.
Maybe combine the two approaches:
- Still subscribe to runtime events.
- But when an event happens, make a query to see how many runtimes there are instead of just incrementing.
Also, we should make sure that in case metrics are disabled, we don't use the metrics updater at all.
But we already do the same for |
e18a6af
to
e7beaec
Compare
Anyway fixed. |
a5d9176
to
7cb7d66
Compare
Oh I didn't see that, sorry. So in this case I would be for keeping this consistent and the thing you proposer would actually be better, just maybe adjust the update interval (the current one seems excessive, something like 1 min should be enough). In case this becomes a problem we can optimize it later. I would however disable the metrics updater in case metrics are disabled to avoid needless queries as currently it seems this is always running even if the metrics are not actually reported anywhere. |
7cb7d66
to
7d07c45
Compare
7d07c45
to
6fb70a2
Compare
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.
One minor nit, otherwise looks good.
Codecov Report
@@ Coverage Diff @@
## master #3161 +/- ##
==========================================
+ Coverage 68.63% 68.66% +0.02%
==========================================
Files 383 383
Lines 37463 37459 -4
==========================================
+ Hits 25713 25721 +8
+ Misses 8487 8477 -10
+ Partials 3263 3261 -2
Continue to review full report at Codecov.
|
6fb70a2
to
ea4fedd
Compare
Runtime events are also triggered when a runtime is resumed, however we never subtract a runtime being suspended.