-
Notifications
You must be signed in to change notification settings - Fork 859
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
Creating an SQS queue results in invalid headers sent to X-Ray #2992
Comments
Hi @ctartamella, Good afternoon. Could you please share the below:
I found reference to SetRecursionDetectionHeader() in SDK which adds Thanks, |
So, this is running in some .NET integration tests on my local machine. Effectively a console application. We are not setting that environment variable at all nor are we trying to opt in to X-Ray. This header seems to be added automatically for reasons I can not tell. |
@ctartamella Thanks for your response. Could you please share the sample code solution that reproduces the issue? |
As I am working on putting together a minified code sample, there are a few context points I'd like to include:
It's not clear to me why this would be the case as I am using named HTTP clients, however it is the most likely. |
@ctartamella Thanks for the update. Also refer https://docs.aws.amazon.com/xray/latest/devguide/xray-concepts.html#xray-concepts-traces, where it has information about the format of |
I've confirmed that the MartinCostello.Testing.AwsLambdaTestServer package is indeed the likely culprit here. I'm going to pursue this with him. Thanks for the attention! |
|
For anyone who may come across this issue in the future, this was fixed in v0.7.1 of Lambda Test Server. |
Describe the bug
Using SQS as part of integration testing, we create a new FIFO queue. As part of this request, the error listed below occurs. It appears that the format of the string being sent in the X-Ray trace id header is incorrect based on AWS documentation.
As a work around, we provided our own HTTP message handler in order to strip these headers from the request before sending them, however it is unclear why this happens to begin with. This is code running on a local machine with credentials provided through a shared credential file. With the work around these tests run correctly. Similar bugs have been posted previously to the Python SDK. My uneducated guess is that the format of the X-Ray trace ID changed and the SDK somehow wasn't updated.
Work around below:
Expected Behavior
I would expect the queue to be created as desired.
Current Behavior
The following error occurs
Reproduction Steps
The following request documents what is being sent to SQS:
sync-queue.json:
Possible Solution
No known solution other than the work around (which would disable X-ray tracing).
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.Core 3.7.106.41
AWSSDK.SQS 3.7.102.9
AWSSDK.Extensions.NETCore.Setup 3.7.7
Targeted .NET Platform
.NET 6
Operating System and version
Windows 11
The text was updated successfully, but these errors were encountered: