Introducing DynamoDB interception via SDK client class replacement#1495
Open
aschenzle wants to merge 10 commits intoWebFuzzing:masterfrom
Open
Introducing DynamoDB interception via SDK client class replacement#1495aschenzle wants to merge 10 commits intoWebFuzzing:masterfrom
aschenzle wants to merge 10 commits intoWebFuzzing:masterfrom
Conversation
…ing transactional operations and SQL like queries.
…ing transactional operations and SQL like queries.
…ing transactional operations and SQL like queries.
jgaleotti
requested changes
Apr 9, 2026
...a/instrumentation/coverage/methodreplacement/thirdpartyclasses/DynamoDbClassReplacement.java
Outdated
Show resolved
Hide resolved
...a/instrumentation/coverage/methodreplacement/thirdpartyclasses/DynamoDbClassReplacement.java
Outdated
Show resolved
Hide resolved
| Collections.sort(tableNames); | ||
| return tableNames; | ||
| } catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) { | ||
| return Collections.emptyList(); |
Collaborator
There was a problem hiding this comment.
Why is is defaulted to empty?
Collaborator
Author
There was a problem hiding this comment.
Seemed like the best option, as we don't want the interception to throw exceptions and retuning null requires handling it. We are just getting less metadata about the interception for this particular request if for some weird reason it fails (Only case I can think this failing would be a dependency problem with another version of the SDK breaking API compatibility, not expected from AWS).
Collaborator
There was a problem hiding this comment.
Why don't you encapsulate this and throw a RuntimeException?
Collaborator
Author
There was a problem hiding this comment.
Just committed a refactored version.
… updating a comment.
… handler cannot invoke DDB methods needed to obtain tablename. Extracted constants. Added Javadoc and improved comments.
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.
Intercepting main operations (Query, Scan, GetItem, BatchGetItems, PutItem, UpdateItem and Delete Item) for both sync and async DynamoDB SDK clients. The interception happens at the SDK level and I've verified it works via an integration test using Docker. There was a dependency conflict while bringing the AWS SDK through Maven, Netty versions would get mixed up for Redis end to end tests so I've made the decision to exclude Netty from Lettuce package and use the Netty version packaged on AWS SDK. All e2e tests are passing.
As this is my first PR I'm looking for exhaustive feedback to quickly learn any conventions I've might missed.