Skip to content

Tracing works with Broker and Trigger#936

Merged
knative-prow-robot merged 176 commits into
knative:masterfrom
Harwayne:keep-tracing
Mar 21, 2019
Merged

Tracing works with Broker and Trigger#936
knative-prow-robot merged 176 commits into
knative:masterfrom
Harwayne:keep-tracing

Conversation

@Harwayne
Copy link
Copy Markdown
Contributor

@Harwayne Harwayne commented Mar 20, 2019

Proposed Changes

  • Tracing works with Broker and Trigger, but not on replies from the Trigger back into the Broker.

Release Note

Tracing works with Broker and Trigger, but not on replies from the Trigger back into the Broker.

Harwayne and others added 30 commits January 28, 2019 09:13
In a follow up PR, I plan to include matching of expressions. It turns
our that they are somewhat more involved than expected.
@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 20, 2019
@knative-prow-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Harwayne

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 Mar 20, 2019
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Mar 20, 2019
@Harwayne Harwayne marked this pull request as ready for review March 20, 2019 21:03
@Harwayne
Copy link
Copy Markdown
Contributor Author

/assign @vaikas-google

@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/receiver.go 82.7% 74.0% -8.8

Copy link
Copy Markdown
Contributor

@n3wscott n3wscott left a comment

Choose a reason for hiding this comment

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

Woo

Comment thread Gopkg.toml
Comment thread pkg/broker/receiver.go
"x-request-id",
)
// These MUST be lowercase strings, as they will be compared against lowercase strings.
forwardPrefixes = []string{
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.

use sets or an array, not both? why both?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I use a set for the first one so that I can easily do forwardHeaders.Has(n). The second, I iterate over, so slice and set are the same to me.

Comment thread pkg/broker/receiver.go
for _, prefix := range forwardPrefixes {
if strings.HasPrefix(lower, prefix) {
ctx = addHeader(ctx, n, v)
break
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.

why do you break here?

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.

Seems like this will only add one header?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This breaks out of the 'range over forwardPrefixes' for loop, not the 'range over all headers from the context' for loop.

@n3wscott
Copy link
Copy Markdown
Contributor

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 21, 2019
@knative-prow-robot knative-prow-robot merged commit 07b62e5 into knative:master Mar 21, 2019
@Harwayne Harwayne deleted the keep-tracing branch March 21, 2019 17:08
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.

8 participants