-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: AWS SdkV2 support with auto-trace #78
base: master
Are you sure you want to change the base?
fix: AWS SdkV2 support with auto-trace #78
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #78 +/- ##
============================================
- Coverage 78.37% 76.54% -1.84%
Complexity 436 436
============================================
Files 49 50 +1
Lines 2021 2072 +51
Branches 214 217 +3
============================================
+ Hits 1584 1586 +2
- Misses 357 406 +49
Partials 80 80 ☔ View full report in Codecov by Sentry. |
@@ -89,4 +92,26 @@ public static boolean isKillSwitchOn() { | |||
String value = System.getenv("LUMIGO_SWITCH_OFF"); | |||
return "true".equalsIgnoreCase(value); | |||
} | |||
|
|||
public static boolean isAutoTrace() { |
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.
I want to inject the jar only when we use autoTrace
try { | ||
SdkHttpRequest.Builder requestBuilder = context.httpRequest().toBuilder(); | ||
requestBuilder.appendHeader("X-Amzn-Trace-Id", spansContainer.getPatchedRoot()); |
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.
We dont need to inject traceId because its auto injected by aws
@@ -131,7 +131,7 @@ Add the environment variable `JAVA_TOOL_OPTIONS` to your Lambda functions and se | |||
|
|||
### Supported Instrumentation Libraries | |||
|
|||
- Aws SDK V1 | |||
- Aws SDK V1 (Supported only from dependency and not from the auto trace with lambda layer) |
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.
can we somehow know it and print it as warn?
I mean, if the sdk1 exist, and we were imported with a layer
if (isAutoTrace()) { | ||
installTracerJar(inst); |
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.
must this be executed lastly?
because it seems not pure/ not dry
No description provided.