Skip to content

Tracing fix for MessageDispatcher#2917

Merged
knative-prow-robot merged 5 commits into
knative:masterfrom
slinkydeveloper:tracing_fix
Apr 7, 2020
Merged

Tracing fix for MessageDispatcher#2917
knative-prow-robot merged 5 commits into
knative:masterfrom
slinkydeveloper:tracing_fix

Conversation

@slinkydeveloper
Copy link
Copy Markdown
Contributor

Fixes #2813 E2E tests

@knative-prow-robot knative-prow-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 6, 2020
@googlebot googlebot added the cla: yes Indicates the PR's author has signed the CLA. label Apr 6, 2020
Comment on lines -158 to -161
span := trace.FromContext(request.Context())
if span != nil {
transformers = append(transformers, tracing.AddTraceparent(span)...)
}
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.

According to https://github.com/cloudevents/spec/blob/master/extensions/distributed-tracing.md, the tracing extensions should still be set even though the HTTP headers will be used for trace propagation.

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.

To be honest this is not clear to me, because first it states that:

the Distributed Tracing attributes MUST be encoded over HTTP(S) as headers

but then it talks about conflicts... I think this needs some clarification in the spec itself

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.

I agree it could use clarification. If the CE attributes are optional over HTTP we should avoid setting them. In this case maybe we should even clear them when already present in the event?

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.

That's an interesting question... I suppose we should, and maybe at this point it just makes sense to keep the initial AddTraceparent... Can you open an issue so we can find out the solution in a followup? I wanna have this one merged to unblock the #2813

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.

I've created #2918. In the meantime I think it's OK to drop AddTraceparent if you prefer.

@lgtm-com
Copy link
Copy Markdown

lgtm-com Bot commented Apr 6, 2020

This pull request introduces 2 alerts when merging ca57e9c into 2b95e56 - view on LGTM.com

new alerts:

  • 2 for Useless assignment to local variable

@nlopezgi
Copy link
Copy Markdown
Contributor

nlopezgi commented Apr 6, 2020

I can confirm this PR resolve the issues in #2813

Comment thread pkg/channel/message_dispatcher.go Outdated
@ian-mi
Copy link
Copy Markdown
Contributor

ian-mi commented Apr 7, 2020

/lgtm

@knative-prow-robot knative-prow-robot added lgtm Indicates that a PR is ready to be merged. and removed lgtm Indicates that a PR is ready to be merged. labels Apr 7, 2020
@ian-mi
Copy link
Copy Markdown
Contributor

ian-mi commented Apr 7, 2020

/lgtm

@knative-prow-robot knative-prow-robot added the lgtm Indicates that a PR is ready to be merged. label Apr 7, 2020
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
Signed-off-by: Francesco Guardiani <francescoguard@gmail.com>
@knative-prow-robot knative-prow-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 7, 2020
@knative-metrics-robot
Copy link
Copy Markdown

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

File Old Coverage New Coverage Delta
pkg/channel/message_dispatcher.go 86.3% 85.7% -0.6
pkg/channel/message_receiver.go 76.4% 75.0% -1.4

@matzew
Copy link
Copy Markdown
Member

matzew commented Apr 7, 2020

/lgtm
/approve

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matzew, slinkydeveloper

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 Apr 7, 2020
@knative-prow-robot knative-prow-robot merged commit a83f70c into knative:master Apr 7, 2020
@slinkydeveloper slinkydeveloper deleted the tracing_fix branch April 7, 2020 13:03
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/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants