Repository navigation
Queue Prometheous Exporter - #2358
Conversation
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
knative-prow-robot
left a comment
There was a problem hiding this comment.
@mrmcmuffinz: 1 warning.
Details
In response to this:
Fixes #2202, this code is dependent on PR #2337.
Proposed Changes:
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.
|
CLAs look good, thanks! |
…s metrics and relocated some code from queue main to here. Signed-off-by: [email protected] <[email protected]>
…up into the NewStats function. Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
markusthoemmes
left a comment
There was a problem hiding this comment.
Hey great! 👍 All the TODOs are gone and it looks quite clean now 🎉 ! Left a few comments to maybe clean up some edges. Definitely getting there :)
…xp-2202 Signed-off-by: [email protected] <[email protected]>
Signed-off-by: [email protected] <[email protected]>
markusthoemmes
left a comment
There was a problem hiding this comment.
I think the remainder of my comments are pure code hygiene. Great job with the tests 🎉
| "", | ||
| config, | ||
| revision, | ||
| }, |
There was a problem hiding this comment.
Do you mind adding the keys for the values to the test-instances? Gives more inline context when scrolling through.
|
|
||
| // TODO(mattmoor): Move this key to be in terms of the KPA. | ||
| servingRevisionKey = autoscaler.NewKpaKey(servingNamespace, servingRevision) | ||
| health = &healthServer{alive: true} |
There was a problem hiding this comment.
Any reason to move this here? Seems leftover from refactoring?
There was a problem hiding this comment.
It did not make sense to keep it where it was based on the flow of the code. With the exception of the global channels a lot of the globals were initialized in initEnv...
| if err != nil { | ||
| logger.Fatal("Failed to create stats reporter", zap.Error(err)) | ||
| } | ||
| reporter = _reporter |
There was a problem hiding this comment.
Should this be moved down into main, closer to the initialization of the exporter endpoint, to have it all packed in one place?
I think the initEnv function is supposed to read environment values into globals.
There was a problem hiding this comment.
It needs to be initialized before the healthServer exporter is used due to the dependency it has on reporting now. And I see no indication on what initEnv should be used for by this I mean I can initialization happening in there that is not related to environment values...
Signed-off-by: [email protected] <[email protected]>
|
The following is the coverage report on pkg/.
|
|
Given the rest of my comments come down to taste of where to put things. /lgtm I'll leave to @josephburnett to approve since he wanted to take a look earlier. Thanks for all your work @mrmcmuffinz |
josephburnett
left a comment
There was a problem hiding this comment.
/lgtm
/approve
Nice work!
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: josephburnett, mrmcmuffinz 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 |
* chg: dev: added initial prometheus exporter code. Signed-off-by: [email protected] <[email protected]> * new: dev: added status reporter file for queue reporting of prometheus metrics and relocated some code from queue main to here. Signed-off-by: [email protected] <[email protected]> * chd: dev: relocated some code out of queue main and added a few todos. Signed-off-by: [email protected] <[email protected]> * chg: dev: added report function for promethus reporter and hooked it up into the NewStats function. Signed-off-by: [email protected] <[email protected]> * new: dev: moved healthServer to its own file. Signed-off-by: [email protected] <[email protected]> * chg: dev: relocated healthServer. Signed-off-by: [email protected] <[email protected]> * chg: dev: added in other stat reporters. Signed-off-by: [email protected] <[email protected]> * chg: dev: fixed function calls to use exported names. Signed-off-by: [email protected] <[email protected]> * chg: dev: bug fixes. Signed-off-by: [email protected] <[email protected]> * chg: test: fixes for queue tests. Signed-off-by: [email protected] <[email protected]> * chg: doc: updated some comments. Signed-off-by: [email protected] <[email protected]> * chg: dev: added back the context tags for the prometheus exporter and moved the initialization out of the Report function. * chg: dev: removed some debugging code. Signed-off-by: [email protected] <[email protected]> * chg: dev: fixed a few bugs in tests, propagated the tags down to the Reporter and did some cleanup of code. Signed-off-by: [email protected] <[email protected]> * chg: dev: addressing reviewing comments. Signed-off-by: [email protected] <[email protected]> * chg: dev: added todo per @josephburnett. Signed-off-by: [email protected] <[email protected]> * chg: dev: reverting refactor. Signed-off-by: [email protected] <[email protected]> * chg: dev: reverting some changes. Signed-off-by: [email protected] <[email protected]> * chg: dev: bug fixes after merging. Signed-off-by: [email protected] <[email protected]> * chg: dev: removed some stale todo comments. Signed-off-by: [email protected] <[email protected]> * chg: dev: moved reporter responsible logic into reporter method. Signed-off-by: [email protected] <[email protected]> * chg: dev: fixed typo. Signed-off-by: [email protected] <[email protected]> * chg: dev: relocated reporter from healthServer to global variable. Signed-off-by: [email protected] <[email protected]> * chg: dev: added defensive code and unregister functionality for views. Signed-off-by: [email protected] <[email protected]> * new: test: initial take on stats_reporter.go tests. Signed-off-by: [email protected] <[email protected]> * chg: test: expanded testing coverage. Signed-off-by: [email protected] <[email protected]> * chg: dev: removed reporter from healthServer. Signed-off-by: [email protected] <[email protected]> * chg: dev: comment typo fix. Signed-off-by: [email protected] <[email protected]>
This reverts commit 9ac07d3.
Fixes #2202.
Proposed Changes:
Adding prometheus metrics exporter.