generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 33
Closed
Labels
area/loggingCore logging utilityCore logging utilityfeature-requestNew or enhancements to existing featuresNew or enhancements to existing featuresstatus/confirmedThe scope is clear, ready for implementationThe scope is clear, ready for implementationtriagePending triage from maintainersPending triage from maintainers
Milestone
Description
Use case
On exceptions within the Logging framework code, currently, it throws an exception and brings down the whole application.
For example below is a code that has a mismatch count of parameters passed to the log message - Missing Count
property value being passed in.
Logger.LogInformation(extraKeys, "Retrieved data for city {cityName} with count {Count}", new[] { cityName });
It throws an exception and causes the Lambda Handler endpoint to crash and return a 500 Internal Server Error
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Microsoft.Extensions.Logging.LogValuesFormatter.GetValue(Object[] values, Int32 index)
at Microsoft.Extensions.Logging.FormattedLogValues.get_Item(Int32 index)
at Microsoft.Extensions.Logging.FormattedLogValues.GetEnumerator()+MoveNext(
Solution/User Experience
On exceptions within the logging framework, it should gracefully handle this without causing the application to crash. A similar approach is taken by other popular libraries in this space (e.g Serilog)
Alternative solutions
No response
Acknowledgment
- This feature request meets Powertools for AWS Lambda (.NET) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and TypeScript
hjgracaFabioh
Metadata
Metadata
Assignees
Labels
area/loggingCore logging utilityCore logging utilityfeature-requestNew or enhancements to existing featuresNew or enhancements to existing featuresstatus/confirmedThe scope is clear, ready for implementationThe scope is clear, ready for implementationtriagePending triage from maintainersPending triage from maintainers
Type
Projects
Status
👀 In review