Retrieve tracing header from request headers during report#2182
Retrieve tracing header from request headers during report#2182duderino merged 6 commits intoistio:release-1.1from
Conversation
|
@kyessenov @JimmyCYJ ptal thanks! |
kyessenov
left a comment
There was a problem hiding this comment.
I think we still need an integration test in istio.
mandarjog
left a comment
There was a problem hiding this comment.
/lgtm
integration test it is.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: bianpengyuan, mandarjog If they are not already assigned, you can assign the PR to them by writing 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 |
|
@duderino Could you help to merge this? This is a bug fix for mixer tracing adapter due to a behavior change in envoy. Mixer adapter relies on b3 headers to instrument spans. Mixer client assumes request headers are all ready at check time so it only processes request header once. However envoy injects those tracing headers at envoy.router filter, which causes mixer filter missing tracing headers, or mistakenly using b3 headers for downstream span to instrument upstream span. This PR adds functionality to extract tracing headers at report time, an integration test has already been added. I will add another test in istio/istio with sha update. Thanks! |
|
@duderino integration test is in a pending PR now: istio/istio#13671 |
|
@duderino gentle ping. Let me know if this should be merged to master. |
|
@bianpengyuan I think we need to manually cherry pick this PR to master and link both PRs to the underlying issue. |
|
Can we merge this PR? |
When will this PR be released ? |
|
@duderino many thanks! @silencehe09 hopefully a subsequent 1.1.X series of releases will include this change. @bianpengyuan can you track the use of this in istio/istio and merge up into |
|
@douglas-reid istio/istio#13671 pick this change into istio/istio and #2197 picks the change into istio/proxy master. |
|
hi @douglas-reid, seems we encounter the same issue described in issue when and which istio version may merge this pr? |
|
@douglas-reid @duderino @fpesce The change is already in 1.2. Question is do we still want to cherry pick this into 1.1 and do a 1.1.8 release or we should just wait for 1.2. |
Fixes istio/istio#13391
Even though tracing happens before all filters inside envoy (https://github.com/envoyproxy/envoy/blob/master/source/common/http/conn_manager_impl.cc#L735), the tracing header injection actually happens at envoy.router filter (https://github.com/envoyproxy/envoy/blob/master/source/common/router/router.cc#L1218).
The current behavior of mixer filter is that it extracts request headers once at
decodeHeaderscallback during check time. However request header is not yet ready by that time. This PR extracts b3 tracing headers at report time and add them into request.header attribute.