You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this release we added new logging features including ExtraKeys for temporary key management within scopes, an Enabled property for LogBuffering configuration, and TenantId support for Lambda Tenant Isolation observability. We also fixed a stdout file descriptor leak in the logging utility and an idempotency key collision issue when using multiple idempotent methods.
Added ExtraKeys() method to Logger for temporary key management within scopes. Keys are automatically cleaned up when the scope exits, with full support for async/await boundaries using AsyncLocal-based scope storage. Supports multiple overloads: Dictionary, params tuples, and nested scopes.
Dictionary syntax:
using(Logger.ExtraKeys(newDictionary<string,object>{{"orderId","123"}})){Logger.LogInformation("Processing order");// includes orderId}// orderId is automatically removed
Tuple syntax:
using(Logger.ExtraKeys(("orderId","123"),("customerId","456"))){Logger.LogInformation("Processing");// includes orderId and customerId}
Added Enabled property to LogBufferingOptions to explicitly control log buffering activation. This allows configuring log buffering through property assignment instead of requiring constructor parameters.
Added TenantId from ILambdaContext to the default logger properties to support AWS Lambda Tenant Isolation observability. When using Lambda Tenant Isolation, the TenantId is automatically captured and included in your structured log output.
Fixed a file descriptor leak in ConsoleWrapper where OverrideLambdaLogger() was creating a new StreamWriter(Console.OpenStandardOutput()) on every log write, leaking one pipe file descriptor per call. Under sustained load in warm Lambda containers this exhausted the 1024 FD limit and crashed the function with "Too many open files". The stdout stream is now opened once and reused.
🐛 Idempotency Key Collision Fix
Fixed an issue where multiple idempotent methods with the same key would share the same idempotency record. The persistence store now uses AsyncLocal for the full function name, correctly isolating keys per method.
// Before: both methods would generate the same idempotency key// After: each method generates a unique key based on the full function name[Idempotent]publicTask<Response>MethodA(stringkey){ ...}[Idempotent]publicTask<Response>MethodB(stringkey){ ...}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
In this release we added new logging features including
ExtraKeysfor temporary key management within scopes, anEnabledproperty for LogBufferingconfiguration, andTenantIdsupport for Lambda Tenant Isolation observability. We also fixed a stdout file descriptor leak in the logging utility and an idempotency key collision issue when using multiple idempotent methods.Thank you @jihed-garaouch for your first contribution ⭐
What's New
✨ ExtraKeys for Logger
| Docs
Added
ExtraKeys()method to Logger for temporary key management within scopes. Keys are automatically cleaned up when the scope exits, with full support for async/await boundaries using AsyncLocal-based scope storage. Supports multiple overloads: Dictionary, params tuples, and nested scopes.Dictionary syntax:
Tuple syntax:
✨ LogBuffering Enabled Property
| Docs
Added
Enabledproperty toLogBufferingOptionsto explicitly control log buffering activation. This allows configuring log buffering through property assignment instead of requiring constructor parameters.✨ TenantId Support
Added
TenantIdfromILambdaContextto the default logger properties to support AWS Lambda Tenant Isolation observability. When using Lambda Tenant Isolation, theTenantIdis automatically captured and included in your structured log output.{ "Level": "Information", "Message": "Processing request", "TenantId": "tenant-abc-123", ... }🐛 Stdout File Descriptor Leak Fix
Fixed a file descriptor leak in
ConsoleWrapperwhereOverrideLambdaLogger()was creating a newStreamWriter(Console.OpenStandardOutput())on every log write, leaking one pipe file descriptor per call. Under sustained load in warm Lambda containers this exhausted the 1024 FD limit and crashed the function with "Too many open files". The stdout stream is now opened once and reused.🐛 Idempotency Key Collision Fix
Fixed an issue where multiple idempotent methods with the same key would share the same idempotency record. The persistence store now uses
AsyncLocalfor the full function name, correctly isolating keys per method.Changes
🌟New features and non-breaking changes
📜 Documentation updates
3bba0a9to8f41b60in /docs (chore(deps): bump squidfunk/mkdocs-material from3bba0a9to8f41b60in /docs #1141) by @dependabot[bot]🐛 Bug and hot fixes
🔧 Maintenance
3bba0a9to8f41b60in /docs (chore(deps): bump squidfunk/mkdocs-material from3bba0a9to8f41b60in /docs #1141) by @dependabot[bot]This release was made possible by the following contributors:
@dependabot[bot], @dreamorosi, @hjgraca, @jihed-garaouch and dependabot[bot]
This discussion was created from the release 3.2.0.
Beta Was this translation helpful? Give feedback.
All reactions