how to set http request header when using SQSClient #2457
-
the use case is to send header "X-Amzn-Trace-Id" which contains opentelemetry trace context, but found no where to add custom header on the inner http request ... any idea? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@mumutu66 I suspect there is no way to add custom HTTP headers to the request object. Instead of having to manually add trace Id to header, have you tried example at https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-dotnet-sdkclients.html? Thanks, |
Beta Was this translation helpful? Give feedback.
-
@ashishdhingra Thanks for replying , I finally figure out the way to add custom http headers in two way one by the event x-ray seems only support framework above 4.5 and research the opentelemetry-java-instrumention lib finally got a way only depends on sqs lib , so I edit the reply to record the manul way to transfer the tracercontext, and it's quite easy.
|
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
@mumutu66 I suspect there is no way to add custom HTTP headers to the request object. Instead of having to manually add trace Id to header, have you tried example at https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-dotnet-sdkclients.html?
Thanks,
Ashish