You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AWS SDK instrumentation: HTTP POST body included in Span http.url #8956
AWS SDK may use query parameters to populate an AWS SDK request's data. For example, the SesAsyncClient's sendEmail method adds various email attributes as query parameters (e.g. email subject and email body) using the QueryProtocolMarshaller. Before dispatching the actual HTTP request the AWS SDK moves the query parameters to HTTP body using the QueryParametersToBodyInterceptor. Thus, the initial query parameter data is included in the POST body instead of the URL in the end.
This has an undesirable side effect with the OpenTelementry agent. The instrumented AWS SDK calls the SdkHttpRequestgetUri method, which returns the initial query parameters, to populate a Span's http.url attribute. This results in Spans that include email content and other POST body data in the http.url attribute.
Steps to reproduce
The issue can be reproduced by running the following code with OpenTelemetry Java agent.
What did you expect to see?
The span to contain http.url with value https://email.us-east-1.amazonaws.com.
What did you see instead?
The Span's http.url containing value https://email.us-east-1.amazonaws.com?Action=SendEmail&Version=2010-12-01&Message.Subject.Data=test%20subject&Message.Body.Text.Data=test%20text
I propose that an additional check is added in AWS SDK instrumentation when the request URL is resolved.
Activity
mateuszrzeszutek commentedon Jul 17, 2023
Related issue: #8453
rapphil commentedon Jul 17, 2023
Hi, this PR included in the OpenTelemetry instrumentation for Java 1.28.0 solves this issue: #8931
(Please take a look into the Unit tests added)
semonte commentedon Jul 17, 2023
This is great news, thank you! I'll close this bug then.