opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
Proposal: aws-sdk-1.11: Drop support for versions <1.11.106
This is a bit of a selfish proposal: To add message-attributes-based SQS injection to the AWS SDK v1, I need to move the span creation ahead to beforeMarshall (very similar to what I did for v2 in #8405). I then of course need to pass the created context along to beforeRequest, etc. This is not possible via the handler context before 1.11.106 since the handler context only exists on the marshalled Request<T> but not the original AmazonWebServiceRequest (see https://github.com/aws/aws-sdk-java/blame/1.12.501/aws-java-sdk-core/src/main/java/com/amazonaws/AmazonWebServiceRequest.java#L556-L559).
I am creating this with the assumption that dropping that old & out-of-support version is no big concern. Otherwise, it may be possible to work around this by setting the Context as current briefly between beforeMarshalling and beforeRequest (currently it is only set as current in the javaagent, not the library, I'm assuming for a good reason), or use a thread local or worst case some kind of weak hash map based solution.
PTAL @laurit @mateuszrzeszutek
(these muzzle checks don't seem to run as part of the default build locally... Forgot to run them manually)
I am creating this with the assumption that dropping that old & out-of-support version is no big concern.
we generally try to avoid dropping old Java agent instrumentation, check out https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/VERSIONING.md#dropping-support-for-older-library-versions
Thanks for the reference. In that case I will try to look if I can sensibly use reflection or something else here. It will not make the code easier to read though.
Hi folks, as datapoint I would like to share that the AWS SDK for Java 1.11.x series is no longer supported https://github.com/aws/aws-sdk-java#supported-minor-versions and migrating to 1.12.x is not supposed to required code changes.
since we do not plan on dropping support at this time, and no further activity is being done on this PR in a couple years, I'm going to close it. Feel free to re-open and restart the discussion if you want to continue with this