AWS SQS: message size limit exceeded after adding attributes #4499
Labels
area:automatic-instrumentation
Automatic instrumentation managed C# code (Datadog.Trace.ClrProfiler.Managed)
type:bug
We encountered a bug where datadog was appending trace information to SQS message attributes after we checked message size causing an error when message sizes were close to the 256 KiB max for SQS. In this scenario the addition of the trace attribute pushes the total message size above SQS limits and throws an error.
Proposal: The code here should check for not only the 10 attribute limit, but the total message size as well before appending the attribute. Also if the attribute isn't appended a warning should be emitted so that it is clear why propagation isn't happening.
I was considering opening a PR on this, but given at the point it the code where it seems most natural to do the check we only have the message attributes and not the full message body on the interface being passed around I figured I'd open an issue and see what others thought.
dd-trace-dotnet/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AWS/SQS/ContextPropagation.cs
Line 74 in 8bf7761
The text was updated successfully, but these errors were encountered: