aws-sdk-2.2: remove *AdviceBridge classes living in non-standard javaagent package#18915
Merged
laurit merged 1 commit intoJun 8, 2026
Merged
Conversation
Promotes `LambdaImpl` and `SnsImpl` from package-private to `public` in the `…v2_2.internal` package (joining the already-public `SqsImpl` and `BedrockRuntimeImpl`), so each agent `*InstrumentationModule.RegisterAdvice` can reference its `*Impl` class directly for muzzle. Removes the four `*AdviceBridge` helper classes that previously hopped through the library package to access these package-private types. The `internal` package is documented as not-for-public-use, so promoting the visibility doesn't expand the public API surface.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the aws-sdk-2.2 javaagent’s *AdviceBridge classes that were living under the library namespace (io.opentelemetry.instrumentation.*) by updating the javaagent modules to reference the corresponding *Impl classes directly. This aligns the javaagent module’s packages with the project’s standard io.opentelemetry.javaagent.instrumentation.* namespace while preserving the existing muzzle/reference pattern.
Changes:
- Promote
LambdaImplandSnsImpltopublic(still in an.internalpackage with an “internal/unstable” warning) so the javaagent can reference them directly. - Update the four
*InstrumentationModuleclasses to reference*Impldirectly (instead of going through*AdviceBridge) for muzzle/reference purposes. - Delete the four
*AdviceBridgeclasses from the javaagent module.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/internal/SnsImpl.java | Make SnsImpl public and document it as internal/unstable. |
| instrumentation/aws-sdk/aws-sdk-2.2/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/internal/LambdaImpl.java | Make LambdaImpl public and document it as internal/unstable. |
| instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/SqsInstrumentationModule.java | Replace bridge reference with direct SqsImpl reference for muzzle. |
| instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/SnsInstrumentationModule.java | Replace bridge reference with direct SnsImpl reference for muzzle. |
| instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/LambdaInstrumentationModule.java | Replace bridge reference with direct LambdaImpl reference for muzzle. |
| instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/awssdk/v2_2/BedrockRuntimeInstrumentationModule.java | Replace bridge reference with direct BedrockRuntimeImpl reference for muzzle. |
| instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/internal/SqsAdviceBridge.java | Deleted; no longer needed after direct SqsImpl reference. |
| instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/internal/SnsAdviceBridge.java | Deleted; no longer needed after direct SnsImpl reference. |
| instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/internal/LambdaAdviceBridge.java | Deleted; no longer needed after direct LambdaImpl reference. |
| instrumentation/aws-sdk/aws-sdk-2.2/javaagent/src/main/java/io/opentelemetry/instrumentation/awssdk/v2_2/internal/BedrockRuntimeAdviceBridge.java | Deleted; no longer needed after direct BedrockRuntimeImpl reference. |
laurit
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #18428.
The four
*AdviceBridgeclasses live in the javaagent module underio.opentelemetry.instrumentation.awssdk.v2_2.internal— i.e. under the library's package namespace, not the javaagent's standardio.opentelemetry.javaagent.instrumentation.awssdk.v2_2.*— purely so each one can call a package-private*Implsibling for muzzle. This is why the package-name checker (#18428) still needs a carveout for this module.Promoting
LambdaImplandSnsImpltopublic(joiningSqsImplandBedrockRuntimeImpl) lets each agent*InstrumentationModule.RegisterAdvicereference its*Implclass directly, and the four bridge files go away. Theinternalpackage is documented as not-for-public-use, so the visibility change doesn't expand the public API.