-
Notifications
You must be signed in to change notification settings - Fork 32
1.17
#678
-
Summary
AWS Lambda Powertools for .NET - Tracing 1.6.0
🐛 Bug Fixes
- Fixed a NotSupportedException that occurred when using the Tracing utility in native AOT mode with async methods that don't return a value (Task)
- Special thanks to @matthewwilson for reporting this issue! ⭐
📦 Package Information
- Version: 1.6.0
- Package: AWS.Lambda.Powertools.Tracing
Native AOT Support
Important
To allow Tracing to work with your types in native AOT mode, you must add **WithTracing()**
to your source generator configuration. This works with either:
- The default SourceGeneratorLambdaJsonSerializer
- The Powertools Logging utility source generator PowertoolsSourceGeneratorSerializer
Tip
For detailed implementation guidelines, please refer to our AOT support documentation.
Implementation Examples
Using Default Source Generator
using AWS.Lambda.Powertools.Tracing; using AWS.Lambda.Powertools.Tracing.Serializers; private static async Task Main() { Func<string, ILambdaContext, string> handler = FunctionHandler; await LambdaBootstrapBuilder.Create(handler, new SourceGeneratorLambdaJsonSerializer<LambdaFunctionJsonSerializerContext>() .WithTracing()) .Build() .RunAsync(); }
Using Powertools Logging Source Generator
using AWS.Lambda.Powertools.Logging; using AWS.Lambda.Powertools.Logging.Serializers; using AWS.Lambda.Powertools.Tracing; using AWS.Lambda.Powertools.Tracing.Serializers; private static async Task Main() { Func<string, ILambdaContext, string> handler = FunctionHandler; await LambdaBootstrapBuilder.Create(handler, new PowertoolsSourceGeneratorSerializer<LambdaFunctionJsonSerializerContext>() .WithTracing()) .Build() .RunAsync(); }
Changes
📜 Documentation updates
- chore: Tracing Fix async Task Handler exception (chore: Tracing Fix async Task Handler exception #675 ) by @hjgraca
🔧 Maintenance
- chore: Tracing Fix async Task Handler exception (chore: Tracing Fix async Task Handler exception #675 ) by @hjgraca
This release was made possible by the following contributors:
This discussion was created from the release 1.17.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment