-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No Longer Able To Duplicate The Value of the X-B3-Traceid Header using request_headers_to_add #23972
Comments
Hm. I think this is probably the likely culprit: #20503. The |
Yeah, it's my mistake. It' an unexpected behavior change. It's easy to revert the behavior but there may be repeated injectings. |
/assign I will try to make a fix. |
🙀 Error while processing event:
|
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
Our users hit this issue as well. I'm thinking that (1) it's not safe to assume the order of header insertion in HCM, (2) trace ID is actually available on downstream but it's not exposed to the formatters. |
I am thinking should we create a header mutation filter that could be configured as downstream http filter or upstream http filter. Then we can control the order of header insertion/mutation completely? WDYT cc @kyessenov |
I like the idea of breaking apart the HCM features with dedicated extensions. Might be complicated because these header operations nest and inherit between routes, hosts, and actions. |
I want to give it a try. May be we can make it a alternative of current |
There is a valid point about moving some of the HCM features to upstream HTTP filters because then they could be "phased" after the downstream processing, and apply to non HTTP downstream (e.g. TCP). Before you make a PR, I think this might be worth discussing with @alyssawilk and others. |
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or "no stalebot" or other activity occurs. Thank you for your contributions. |
If you are reporting any crash or any potential security issue, do not
open an issue in this repo. Please report the issue via emailing
envoy-security@googlegroups.com where the issue will be triaged appropriately.
Title: No Longer Able To Duplicate The Value of the X-B3-Traceid Header using
request_headers_to_add
Description:
Under previously released versions of Envoy (<1.22) we were able to duplicate the value of the
X-B3-Traceid
header to another upstream header that we use internally. This is to support customers who still expect a custom header.We achieved this using header formatting in the
request_headers_to_add
configuration block, like so:However, since 1.22, this behaviour has changed.
Now, there are two separate outcomes depending on the presence of the
x-b3-traceid
header in the downstream request:Repro steps:
docker compose up
Example-Traceid
header is absent in the echoed response for all versions > 1.21.http://localhost:1210
with the headerx-b3-traceid
set tofoobar
. Notice that theExample-Traceid
header value seen in the JSON response is overwritten by the trace ID generated by Envoy.http://localhost:1220
with the headerx-b3-traceid
set tofoobar
. Notice that theExample-Traceid
header value seen in the JSON response is not overwritten by the trace ID generated by Envoy.If this is not the expected way to achieve this, then we'll happily use an alternative configuration pattern to achieve the same result elsewhere.
Admin and Stats Output:
Config: Available here
Logs:
Call Stack:
The text was updated successfully, but these errors were encountered: