-
Notifications
You must be signed in to change notification settings - Fork 368
Fix issue with ADOT auto-instrumentation and AWS Lambda Trace Id #3629
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
Merged
Conversation
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
…on of OpenTelemetry.Instrumentation.AWSLambda in the Lambda layer
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3629 +/- ##
==========================================
- Coverage 71.41% 71.39% -0.02%
==========================================
Files 443 444 +1
Lines 17519 17527 +8
==========================================
+ Hits 12511 12514 +3
- Misses 5008 5013 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/AWSLambdaUtils.cs
Show resolved
Hide resolved
src/OpenTelemetry.Instrumentation.AWSLambda/Implementation/TraceProviderIsolated.cs
Outdated
Show resolved
Hide resolved
Contributor
Author
|
@martincostello Addressed your comments |
Kielek
approved these changes
Dec 19, 2025
martincostello
approved these changes
Dec 19, 2025
jj22ee
added a commit
to aws-observability/aws-otel-dotnet-instrumentation
that referenced
this pull request
Dec 30, 2025
*Issue #, if available:* - https://github.com/open-telemetry/opentelemetry-dotnet-contrib/releases/tag/Instrumentation.AWS-1.14.1 > Fix issue when using ADOT auto-instrumentation which includes a version of OpenTelemetry.Instrumentation.AWSLambda in the Lambda layer. In this scenario nothing is forcing the NuGet resolution to include the updated version of Amazon.Lambda.Core that has the open-telemetry/opentelemetry-dotnet-contrib#3410 for determining the trace id. (open-telemetry/opentelemetry-dotnet-contrib#3629) *Description of changes:* - Bump `OpenTelemetry.Extensions.AWS` and `OpenTelemetry.Instrumentation.AWSLambda` to include above fix - Downgrade `Amazon.Lambda.Core` in Lambda e2e test sample app to test that it will be forced to be updated by ADOT as per the fix above. *Description of changes:* - Deployed Sample App with older version of `Amazon.Lambda.Core`, verified it succeeded execution. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
jj22ee
added a commit
to jj22ee/aws-otel-dotnet-instrumentation
that referenced
this pull request
Dec 30, 2025
*Issue #, if available:* - https://github.com/open-telemetry/opentelemetry-dotnet-contrib/releases/tag/Instrumentation.AWS-1.14.1 > Fix issue when using ADOT auto-instrumentation which includes a version of OpenTelemetry.Instrumentation.AWSLambda in the Lambda layer. In this scenario nothing is forcing the NuGet resolution to include the updated version of Amazon.Lambda.Core that has the open-telemetry/opentelemetry-dotnet-contrib#3410 for determining the trace id. (open-telemetry/opentelemetry-dotnet-contrib#3629) *Description of changes:* - Bump `OpenTelemetry.Extensions.AWS` and `OpenTelemetry.Instrumentation.AWSLambda` to include above fix - Downgrade `Amazon.Lambda.Core` in Lambda e2e test sample app to test that it will be forced to be updated by ADOT as per the fix above. *Description of changes:* - Deployed Sample App with older version of `Amazon.Lambda.Core`, verified it succeeded execution. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This was referenced Feb 6, 2026
Open
Bump OpenTelemetry.Instrumentation.AspNetCore from 1.12.0 to 1.15.0
rogerbriggen/aspire_otel_test#19
Merged
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.
Fixes
Fix issue when using ADOT auto-instrumentation which includes a version of OpenTelemetry.Instrumentation.AWSLambda in the Lambda layer. In this scenario nothing is forcing the NuGet resolution to include the updated version of Amazon.Lambda.Core that has the reworked logic for determining the trace id.
This is causing us some breaking issues with ADOT and are looking to get this fix released as soon as possible.
Changes
Add defensive code around accessing the
LambdaTraceProvider.CurrentTraceIdand fallback to the environment variable if we get a TypeLoadException. We need to try and useLambdaTraceProvider.CurrentTraceIdto support Lambda's recently released Managed Instances where there is concurrency and an environment variable will not work. For users using Managed Instances feature they are required to use the updated version of Amazon.Lambda.Core in their Lambda function.Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial changes