netty 4.0: do not modify headers in aws request
This commit is contained in:
parent
5029660418
commit
d4943eb2b6
|
@ -53,9 +53,12 @@ public class HttpClientRequestTracingHandler extends ChannelOutboundHandlerAdapt
|
||||||
.withTag(DDTags.SPAN_TYPE, DDSpanTypes.HTTP_CLIENT)
|
.withTag(DDTags.SPAN_TYPE, DDSpanTypes.HTTP_CLIENT)
|
||||||
.start();
|
.start();
|
||||||
|
|
||||||
|
// AWS calls are often signed, so we can't add headers without breaking the signature.
|
||||||
|
if (!request.headers().contains("amz-sdk-invocation-id")) {
|
||||||
GlobalTracer.get()
|
GlobalTracer.get()
|
||||||
.inject(
|
.inject(
|
||||||
span.context(), Format.Builtin.HTTP_HEADERS, new NettyResponseInjectAdapter(request));
|
span.context(), Format.Builtin.HTTP_HEADERS, new NettyResponseInjectAdapter(request));
|
||||||
|
}
|
||||||
|
|
||||||
ctx.channel().attr(AttributeKeys.CLIENT_ATTRIBUTE_KEY).set(span);
|
ctx.channel().attr(AttributeKeys.CLIENT_ATTRIBUTE_KEY).set(span);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue