Migration Guide to v2¶
This guide will help you migrate to v2
Logging¶
Breaking changes from v1 (dependency updates)¶
Info
Looking for V1 specific documentation please go to Logging v1
Change | Before (v1.x) | After (v2.0) | Migration Action |
---|---|---|---|
Amazon.Lambda.Core | 2.2.0 | 2.5.0 | dotnet add package Amazon.Lambda.Core |
Amazon.Lambda.Serialization.SystemTextJson | 2.4.3 | 2.4.4 | dotnet add package Amazon.Lambda.Serialization.SystemTextJson |
Microsoft.Extensions.DependencyInjection | 8.0.0 | 8.0.1 | dotnet add package Microsoft.Extensions.DependencyInjection |
Extra keys - Breaking change¶
In v1.x, the extra keys were added to the log entry as a dictionary. In v2.x, the extra keys are added to the log entry as a JSON object.
There is no longer a method that accepts extra keys as first argument.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
This change was made to improve the performance of the logger and to make it easier to work with the extra keys.
Metrics¶
Breaking changes from V1¶
Info
Loooking for v1 specific documentation please go to Metrics v1
Dimensions
outputs as an array of arrays instead of an array of objects. Example:Dimensions: [["service", "Environment"]]
instead ofDimensions: ["service", "Environment"]
FunctionName
is not added as default dimension and only to cold start metric.Default Dimensions
can now be included in Cold Start metrics, this is a potential breaking change if you were relying on the absence of default dimensions in Cold Start metrics when searching.
