Envoy is changing the x-request-id
version when we configure the connection manager with:
tracing: {}
I configured Envoy with the upstream cluster pointing to postman-echo.com
which will return as response body, the request headers sent.
curl --location --request GET 'localhost:8080/headers' \
--header 'x-request-id: 968ea8f8-3806-45c9-8228-8d3dde5df3b4' \
--header 'x-another-id: 968ea8f8-3806-45c9-8228-8d3dde5df3b4'
{
"headers":{
"x-forwarded-proto":"http",
"x-forwarded-port":"80",
"host":"localhost",
"x-amzn-trace-id":"Root=1-5f97d990-6daf0ed27c296cad5e916f6c",
"content-length":"0",
"user-agent":"curl/7.64.1",
"accept":"*/*",
"x-request-id":"968ea8f8-3806-95c9-8228-8d3dde5df3b4",
"x-another-id":"968ea8f8-3806-45c9-8228-8d3dde5df3b4",
"x-envoy-expected-rq-timeout-ms":"15000"
}
}
-968ea8f8-3806-45c9-8228-8d3dde5df3b4
+968ea8f8-3806-95c9-8228-8d3dde5df3b4
My use case is the one below, as I need to copy the x-request-id
as a tag:
tracing:
custom_tags:
- tag: x-request-id
request_header:
name: x-request-id
But as you can try it out here, only by adding an empty tracing: {}
the problem happens.
Also, the problem only happens with the x-request-id
, as you can see I used also a x-another-id
and that one did not change.