-
Notifications
You must be signed in to change notification settings - Fork 879
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
aws-sdk-2.2: More reflection cleanup. #8775
aws-sdk-2.2: More reflection cleanup. #8775
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
...c/main/groovy/io/opentelemetry/instrumentation/awssdk/v2_2/AbstractAws2SqsTracingTest.groovy
Outdated
Show resolved
Hide resolved
...ws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/SqsAccess.java
Show resolved
Hide resolved
This is required to avoid enabled=false in some cases.
} | ||
public void doTransform(TypeTransformer transformer) { | ||
transformer.applyAdviceToMethod( | ||
isConstructor(), SqsInstrumentationModule.class.getName() + "$RegisterAdvice"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isConstructor would apply to the constructor of software.amazon.awssdk.core.SdkClient which is an interface (https://github.com/aws/aws-sdk-java-v2/blob/c7c731f81d68403ce50b60dea61f413c269e57d0/core/sdk-core/src/main/java/software/amazon/awssdk/core/SdkClient.java#L27).
It does work though, and we would not depend on the Advice actually being invoked as long as the helper classes are injected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could also use none()
, as you noted the isConstructor()
match is impossible here, but as it is only needed to trigger class injection it does not need to match anyway. The none()
to trigger injection trick is also used in OpenTelemetryInstrumentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed that in a7683fd and some related cleanup.
Build failures seem to be entirely unrelated, testLatestDeps (only) seems to consistently (or at least twice) fail in |
mongo latest dep test failure should be fixed with #8785 Latest dep tests test agains the latest version of the library, occasional breakage is expected when new library versions are released |
.../aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/SqsImpl.java
Outdated
Show resolved
Hide resolved
…pentelemetry/instrumentation/awssdk/v2_2/SqsImpl.java Co-authored-by: Mateusz Rzeszutek <[email protected]>
Follow-up to #8603, addressing some comments & finishing the half-done cleanup.