LambdaMetrics Event
The LambdaMetrics event is emitted by LambdaSharp.Core when ingesting embedded CloudWatch metrics from the CloudWatch logs associated with the Lambda function. Note that Core Services must be enabled for these events to be emitted. The LambdaMetrics schema is based on the CloudWatch Embedded Metric format. It has the same structure with the additional of the following properties.
Event Schema
Type: String
Version: String
Stack: String
Function: String
GitSha: String?
GitBranch: String?
# CloudWatch Embedded Metric Properties
Event Properties
Type
-
The
Type
property holds the event type name. This property is always set to"LambdaMetrics"
.Type: String
Version
-
The
Version
property holds the event type version. This property is set to"2020-05-05"
.Type: String
Stack
-
The
Stack
property holds the CloudFormation stack ID containing the Lambda function.Type: String
Function
-
The
Function
property holds logical Lambda function name as defined by its module.Type: String
GitSha
-
The
GitSha
property holds the git SHA checksum when the module was deployed from a git repository, otherwisenull
.Type: String or
null
GitBranch
-
The
GitBranch
property holds the git branch name when the module was deployed from a git repository, otherwisenull
.Type: String or
null
Event Sample
{
"_aws": {
"Timestamp": 1589220705881,
"CloudWatchMetrics": [
{
"Namespace": "Module:Sample.Metric",
"Dimensions": [["Stack"], ["Stack", "Function"]],
"Metrics": [
{ "Name": "CompletedMessages.Latency", "Unit": "Milliseconds" },
{ "Name": "CompletedMessages.Count", "Unit": "Count" }
]
}
]
},
"Type": "LambdaMetrics",
"Version": "2020-05-05",
"CompletedMessages.Latency": 100.0,
"CompletedMessages.Count": 1.0,
"Stack": "Sandbox-Sample-Metric",
"Function": "MyFunction",
"GitSha": "DIRTY-07ed927da2d1f7fea61a1472b14e647506c3bbc7",
"GitBranch": "WIP-v0.8"
}