-
Notifications
You must be signed in to change notification settings - Fork 936
Add utils-lite package #6395
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
Add utils-lite package #6395
Conversation
|
@@ -175,7 +175,7 @@ | |||
<plugin> | |||
<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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
SdkInternalThreadLocal
utility 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: