APM Agent language and version:
Description of the problem including expected versus actual behavior.
After upgrading the AWS SDK v2 in our spring boot service from 2.20.162 to 2.21.0 we see the following message during startup that did not happen before:
2023-10-18 06:26:05,586 [main] WARN co.elastic.apm.agent.bci.bytebuddy.ErrorLoggingListener - Error on transformation software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler java.lang.IllegalStateException: Cannot locate field named clientConfiguration for class software.amazon.awssdk.core.internal.handler.BaseAsyncClientHandler at net.bytebuddy.asm.Advice$OffsetMapping$ForField$Unresolved.resolve(Advice.java:2556) ~[elastic-apm-agent-40510175845988f13f6162ed8526f0b0-a9910a9589b2cceb9a41936e297bb41c.jar:1.43.0] at net.bytebuddy.asm.Advice$OffsetMapping$ForField.resolve(Advice.java:2481) ~[elastic-apm-agent-40510175845988f13f6162ed8526f0b0-a9910a9589b2cceb9a41936e297bb41c.jar:1.43.0] ...
As a consequence, traces that contain communication over SQS stop after an SQS message was sent and the spans after receiving the message are missing.
Steps to reproduce
- Start a spring boot service that uses the APM Java agent 1.43.0 and the AWS Java SDK 2.20.162
- Trigger a transaction that sends a message via SQS to another service with the same dependency versions
- Check the corresponding trace in Kibana
No error message on startup.
Traces continue after SQS message is received.
Error at service startup.
Received SQS messages are not visible in their corresponding trace.
I think the relevant change in the AWS Java SDK is this
Looking at the "Cannot locate field named clientConfiguration" part of the error to me it seems the root cause is that
clientConfiguration has been removed from the derived class and only exists on the base class now where it's private.