Closed hjgraca closed 1 month ago
When capturing cold starts Metrics write FunctionName to the EMF output, the FunctionName is retrieves from the LambdaContext passed to the handler.
StorageResolution should be the int representation of the enum and not the string representation, ie: Instead of"High" should be 1
"High"
1
In an AOT published Lambda when you have the following code
[Metrics(Namespace = "ns", Service = "svc", CaptureColdStart = true)] public void HandleWithParamAndLambdaContext(string input, ILambdaContext context) { }
Should output
{ "_aws": { "Timestamp": 1720714102216, "CloudWatchMetrics": [ { "Namespace": "ns", "Metrics": [ { "Name": "ColdStart", "Unit": "Count" } ], "Dimensions": [ [ "FunctionName" ], [ "Service" ] ] } ] }, "FunctionName": "pt-8", "Service": "svc", "ColdStart": 1 }
But instead was outputing
{ "_aws": { "Timestamp": 1720714102216, "CloudWatchMetrics": [ { "Namespace": "ns", "Metrics": [ { "Name": "ColdStart", "Unit": "Count" } ], "Dimensions": [ [ "FunctionName" ], [ "Service" ] ] } ] }, "FunctionName": null, <--- should not be null "Service": "svc", "ColdStart": 1 }
In an AOT published Lambda have the following code
No response
1.7.0
dotnet6
Expected Behaviour
When capturing cold starts Metrics write FunctionName to the EMF output, the FunctionName is retrieves from the LambdaContext passed to the handler.
StorageResolution should be the int representation of the enum and not the string representation, ie: Instead of
"High"
should be1
Current Behaviour
In an AOT published Lambda when you have the following code
Should output
But instead was outputing
Code snippet
In an AOT published Lambda have the following code
Possible Solution
No response
Steps to Reproduce
In an AOT published Lambda have the following code
Powertools for AWS Lambda (.NET) version
1.7.0
AWS Lambda function runtime
dotnet6
Debugging logs
No response