-
Notifications
You must be signed in to change notification settings - Fork 67
Fix Trace Context extraction from Lambda Context object by bypassing Muzzle Check #1218
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 Trace Context extraction from Lambda Context object by bypassing Muzzle Check #1218
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1218 +/- ##
=============================================
- Coverage 85.71% 67.07% -18.64%
- Complexity 19 525 +506
=============================================
Files 3 54 +51
Lines 49 2694 +2645
Branches 5 376 +371
=============================================
+ Hits 42 1807 +1765
- Misses 3 750 +747
- Partials 4 137 +133 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I changed my PR to avoid Muzzle Check instead of using reflection. |
…Muzzle Check (#1218) *Issue #, if available:* - https://github.com/aws-observability/aws-otel-java-instrumentation/actions/runs/17954879038/job/51066448865 AWS Lambda Environment may or may not have the `getXrayTraceId` method in Lambda Context (from Lambda Core dependency). This will cause OTel's Muzzle Check to disable the AWS Lambda Instrumentation in the event that it isn't present, causing no Lambda Function Handler Span to appear Fix of previous PR: #1191 *Description of changes:* - Use `@NoMuzzle` annotation when accessing `getXrayTraceId` in Lambda Context Object, which avoids OTel's muzzle check. If `NoSuchMethodError` is caught, we do not try this logic again. - Add unit test for when `getXrayTraceId` throws `NoSuchMethodError`. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
…Muzzle Check (#1218) *Issue #, if available:* - https://github.com/aws-observability/aws-otel-java-instrumentation/actions/runs/17954879038/job/51066448865 AWS Lambda Environment may or may not have the `getXrayTraceId` method in Lambda Context (from Lambda Core dependency). This will cause OTel's Muzzle Check to disable the AWS Lambda Instrumentation in the event that it isn't present, causing no Lambda Function Handler Span to appear Fix of previous PR: #1191 *Description of changes:* - Use `@NoMuzzle` annotation when accessing `getXrayTraceId` in Lambda Context Object, which avoids OTel's muzzle check. If `NoSuchMethodError` is caught, we do not try this logic again. - Add unit test for when `getXrayTraceId` throws `NoSuchMethodError`. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available:
AWS Lambda Environment may or may not have the
getXrayTraceIdmethod in Lambda Context (from Lambda Core dependency). This will cause OTel's Muzzle Check to disable the AWS Lambda Instrumentation in the event that it isn't present, causing no Lambda Function Handler Span to appearFix of previous PR: #1191
Description of changes:
@NoMuzzleannotation when accessinggetXrayTraceIdin Lambda Context Object, which avoids OTel's muzzle check. IfNoSuchMethodErroris caught, we do not try this logic again.getXrayTraceIdthrowsNoSuchMethodError.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.