Tracing fix for MessageDispatcher#2917
Conversation
| span := trace.FromContext(request.Context()) | ||
| if span != nil { | ||
| transformers = append(transformers, tracing.AddTraceparent(span)...) | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
I've created #2918. In the meantime I think it's OK to drop AddTraceparent if you prefer.
|
This pull request introduces 2 alerts when merging ca57e9c into 2b95e56 - view on LGTM.com new alerts:
|
|
I can confirm this PR resolve the issues in #2813 |
|
/lgtm |
|
/lgtm |
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>
cc19421 to
ae8cb80
Compare
|
The following is the coverage report on the affected files.
|
|
/lgtm |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes #2813 E2E tests