Skip to content

Broker metrics refactor#1739

Merged
knative-prow-robot merged 5 commits into
knative:masterfrom
nachocano:stats_reporter
Aug 27, 2019
Merged

Broker metrics refactor#1739
knative-prow-robot merged 5 commits into
knative:masterfrom
nachocano:stats_reporter

Conversation

@nachocano
Copy link
Copy Markdown
Contributor

Helps with #1693

Proposed Changes

  • Renaming metrics to match serving naming.
  • Add stats reporters to broker ingress and broker filter.
  • Added more filtering labels to metrics.
  • Reporting delivery times only to things that are dispatched (e.g., not if the subscriberURI was invalid, or if they didn't pass the filter). This is still subject to change

Release Note

Broker and Trigger metrics have been renamed. Please refer to the docs for description of the new metrics.

@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Aug 26, 2019
@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Aug 26, 2019
@nachocano
Copy link
Copy Markdown
Contributor Author

/assign @Harwayne
/assign @sayanh

@knative-prow-robot
Copy link
Copy Markdown
Contributor

@nachocano: GitHub didn't allow me to assign the following users: sayanh.

Note that only knative members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

Details

In response to this:

/assign @Harwayne
/assign @sayanh

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.

@nachocano
Copy link
Copy Markdown
Contributor Author

@capri-xiyue this refactor should also fix #1423

Comment thread pkg/broker/filter/stats_reporter.go Outdated
Comment thread pkg/broker/filter/stats_reporter.go
Comment thread pkg/broker/filter/stats_reporter.go Outdated
Comment thread pkg/broker/filter/stats_reporter.go Outdated
Comment thread pkg/broker/filter/stats_reporter.go Outdated
Comment thread pkg/broker/filter/stats_reporter.go
Comment thread pkg/broker/metrics.go
Comment thread pkg/metrics/metricskey/constants.go Outdated
Comment thread pkg/broker/filter/filter_handler.go Outdated
Comment thread pkg/broker/filter/filter_handler.go Outdated
@nachocano
Copy link
Copy Markdown
Contributor Author

@Harwayne this is ready for another look. Thanks for the comments, all made sense!

@knative-metrics-robot
Copy link
Copy Markdown

The following is the coverage report on pkg/.
Say /test pull-knative-eventing-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/broker/filter/filter_handler.go 82.2% 84.1% 1.9
pkg/broker/filter/stats_reporter.go Do not exist 78.9%
pkg/broker/ingress/ingress_handler.go 60.7% 56.2% -4.5
pkg/broker/ingress/stats_reporter.go Do not exist 78.1%
pkg/broker/metrics.go 50.0% 57.1% 7.1

Copy link
Copy Markdown
Contributor

@Harwayne Harwayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

Letting this submit as-is, because others are going to use it as a template and the only remaining comment is fairly minor and does not affect what will be emulated.

result := r.filterEventByAttributes(attrs, event)
resultStr := "fail"
result := r.filterEventByAttributes(ctx, attrs, event)
filterResult := failFilter
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if r.filterEventByAttributes(ctx, attrs, event) {
    return passFilter
}
return filterResult

Even better is to have filterEventByAttributes return the filterResult.

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 27, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Harwayne, nachocano

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 27, 2019
@knative-prow-robot knative-prow-robot merged commit 2099bc7 into knative:master Aug 27, 2019
aslom pushed a commit to aslom/eventing that referenced this pull request Sep 5, 2019
* Stats reporter refactor

* updating lock

* updates after code review

* go imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cla: yes Indicates the PR's author has signed the CLA. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants