Datadog generates real-time Lambda runtime metrics out-of-the-box for Node.js, Python, Ruby, Java, and Go runtimes. These metrics are enabled by default, but only get sent asynchronously.
Using the Datadog Lambda Library and Datadog Forwarder, Datadog can generate metrics with low latency, several second granularity, and detailed metadata for cold starts and custom tags. These metrics are distinguished by being in the
aws.lambda.enhanced.* namespace, and are Datadog’s best practice for setting real-time monitors on your serverless application health.
Enhanced Lambda metrics give you a view above and beyond the default Amazon CloudWatch metrics enabled with the AWS Lambda integration.
Datadog generates real-time Lambda runtime metrics out-of-the-box for Node.js, Python, and Ruby runtimes.
Using the Datadog Lambda Layers and Datadog Forwarder, Datadog can generate metrics with low latency, several second granularities, and detailed metadata for cold starts and custom tags.
|aws.lambda.enhanced.invocations||Measures the number of times a function is invoked in response to an event or invocation API call.|
|aws.lambda.enhanced.errors||Measures the number of invocations that failed due to errors in the function (response code 4XX).|
|aws.lambda.enhanced.max_memory_used||Measures the amount of memory used by the function.|
|aws.lambda.enhanced.duration||Measures the average elapsed wall clock time from when the function code starts executing as a result of an invocation to when it stops executing.|
|aws.lambda.enhanced.billed_duration||Measures the billed amount of time the function ran for (100ms increments).|
|aws.lambda.enhanced.init_duration||Measures the initialization time of a function during a cold start.|
|aws.lambda.enhanced.estimated_cost||Measures the total estimated cost of the function invocation (US dollars).|
|aws.lambda.enhanced.timeouts||Measures the number of times a function times out.|
|aws.lambda.enhanced.out_of_memory||Measures the number of times a function runs out of memory.|
These metrics are tagged with the
runtime. These are DISTRIBUTION type metrics, so you can display their
Note: Enhanced metrics are sent to the Datadog Forwarder via CloudWatch Logs, meaning you’ll see an increased volume of logs in CloudWatch. This may affect your AWS bill. To opt-out, set the DD_ENHANCED_METRICS environment variable to false on your AWS Lambda functions.
Datadog generates real-time enhanced Lambda metrics out-of-the-box for Node.js, Python, Ruby, Java, and Go runtimes. The installation instructions provide a guided walkthrough of the steps required to enable enhanced Lambda metrics on your functions:
To enable enhanced Lambda metrics without enabling logging for your functions, ensure the
DdForwarderLog environment variable is set to
false on the Datadog Forwarder.
Once you’ve enabled Enhanced Lambda Metrics, view your default dashboard in the Datadog app.