Skip to content
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

Bug update aws sync async client handler instrumentation #3374

Conversation

videnkz
Copy link
Contributor

@videnkz videnkz commented Oct 19, 2023

closes #3372

Checklist

  • This is a bugfix

@github-actions github-actions bot added agent-java community Issues and PRs created by the community triage labels Oct 19, 2023
@github-actions
Copy link

👋 @videnkz Thanks a lot for your contribution!

It may take some time before we review a PR, so even if you don’t see activity for some time, it does not mean that we have forgotten about it.

Every once in a while we go through a process of prioritization, after which we are focussing on the tasks that were planned for the upcoming milestone. The prioritization status is typically reflected through the PR labels. It could be pending triage, a candidate for a future milestone, or have a target milestone set to it.

@videnkz videnkz marked this pull request as ready for review October 19, 2023 09:11
@videnkz
Copy link
Contributor Author

videnkz commented Oct 19, 2023

@JonasKunz hi, I see that you have also opened a PR. If you see fit, you can close this PR.

@JonasKunz
Copy link
Contributor

Hi @videnkz , looks like we've accidentally been working on this in parallel, but took different approaches.

I also thought about accessing the clientConfiguration field reflectively, but decided against it because the good old Field.setAccessible is not guaranteed to always work since Java 9:

If the aws-sdk is loaded in a Java Module (not the unnamed module as it is the case in the tests), the JVM will not allow reflective access to the field from Classloader of the advice class by default. There is a way around this, namely using Lookup.privateLookupIn after "opening" the target module via Instrumentation.redefineModule.

I've implemented a PoC for this "legal" reflection access here, just in case you are curious.

However, I decided that it is not worth introducing this for this fix yet and instead simply instrumented the constructors.

So closing this in favour of #3373 .

@JonasKunz JonasKunz closed this Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-java community Issues and PRs created by the community triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

new version of awssdk 2.21.0+ breaks aws-sdk instrumentations
2 participants