Add utils-lite package#6395
Add utils-lite package#6395RanVaknin merged 3 commits intofeature/master/utils-lite-lambda-tracefrom
Conversation
|
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-shade-plugin</artifactId> | ||
| <version>2.2</version> | ||
| <version>3.5.0</version> |
There was a problem hiding this comment.
This was bumped because the build was failing with:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:2.2:shade (default) on project http-client-benchmarks: Unable to parse configuration of mojo org.apache.maven.plugins:maven-shade-plugin:2.2:shade for parameter Main-Class: Cannot assign configuration entry 'Main-Class' with value 'org.openjdk.jmh.Main' of type java.lang.String to property of type java.util.Map -> [Help 1]
It's not entirely clear why the build fails with it, and why these changes cause this since they seem completely unrelated, but we do have mixed versions of the shade plugin across multiple packages, so i just bumped it to the most recent version
| /** | ||
| * Utility for thread-local context storage. | ||
| */ | ||
| @SdkProtectedApi |
There was a problem hiding this comment.
Could not use SdkInternalApi because the TraceIdExecutionInterceptor (SdkProtectedApi) is using this class and archunit throws an error "no internal APIs across modules"
c7f7e42
into
feature/master/utils-lite-lambda-trace
|
This pull request has been closed and the conversation has been locked. Comments on closed PRs are hard for our team to see. If you need more assistance, please open a new issue that references this one. |




This PR adds a new utils-lite code package that provides thread local storage wrapper for sharing data across components, specifically to support lambda trace ID propagation.
Background
Previously, we implemented trace ID propagation using SLF4J's MDC in PR #6363, but this was
reverted because the MDC interface exists but the implementation is not provided by the SDK, Lambda runtime, or X-Ray SDK.
Solution
Added a small
SdkInternalThreadLocalutility class that provides thread local key value storage usingThreadLocal<Map<String, String>>. For this case, it allows the Lambda Runtime Interface Client, AWS SDK, and X-Ray SDK to share trace context via this one package, but can extended to other use cases.Example: