-
Notifications
You must be signed in to change notification settings - Fork 420
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
Adding opencensus metrics #1061
Adding opencensus metrics #1061
Conversation
The following is the coverage report on the affected files.
|
7d4fc69
to
b279a23
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
b279a23
to
af98ff7
Compare
The following is the coverage report on the affected files.
|
af98ff7
to
b4ac1e2
Compare
The following is the coverage report on the affected files.
|
b4ac1e2
to
e8a710f
Compare
The following is the coverage report on the affected files.
|
TODO:
|
ObjectMeta: metav1.ObjectMeta{Name: metrics.ConfigMapName()}, | ||
Data: map[string]string{ | ||
//TODO: Better nonempty config | ||
"_example": "See tekton-pipelines namespace for valid values", |
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.
Yeah, we should probably have a more sensible default here.
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.
So, one thing here is that this is a sensible default in that it will automatically select a prometheus exporter on 9090. It just needs to have one key so that the configmap watcher things the configmap is valid. See what we do for this in the install: https://github.com/tektoncd/triggers/blob/main/config/config-observability.yaml#L24
I could just copy the example value whole hog, but I didn't want to duplicate code too much.
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.
ok, I'd change the message to say See config-observability in tekton-pipelines (or a link to the docs) for valid values
946b475
to
24a60db
Compare
The following is the coverage report on the affected files.
|
The following is the coverage report on the affected files.
|
24a60db
to
e93bc49
Compare
The following is the coverage report on the affected files.
|
} | ||
|
||
func (s *Sink) recordResourceCreation(resources []json.RawMessage) { | ||
for _, rt := range resources { |
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.
how hard would it be to add some unit tests for the functions in this file? esp. this one to verify that we are adding the right metric?
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.
definitely possible, ill take a look
e93bc49
to
354c3db
Compare
The following is the coverage report on the affected files.
|
354c3db
to
b1cef01
Compare
The following is the coverage report on the affected files.
|
It looks like this PR now includes a couple of other commits? Could you rebase/squash from main? Otherwise, looks good |
This PR creates an initial structure where the eventlistener sink is able to record metrics about its operation to a recorder that operates based off the same config structure that the triggers controller uses. The metrics recorded in this PR are the histogram of HTTP request duration and the count of resources created by this eventlistener, categorized by resource kind.
b1cef01
to
860b287
Compare
The following is the coverage report on the affected files.
|
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dibyom 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 |
Changes
Adding metrics for eventlisteners
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Release Notes