AWS Lambda extensions enable you to seamlessly integrate third-party tooling with your Lambda environment so you can run custom code or monitoring agents alongside your functions. We’ve partnered with AWS to create a Lambda extension that offers a more cost-effective, simplified process for collecting data from your functions. You can now use the extension to collect function logs and any enhanced metrics, custom metrics, and traces generated by Datadog’s Lambda library and submit that data to Datadog as part of the function’s execution. This complements the CloudWatch Lambda metrics you already collect via our AWS integration as well as logs from other AWS services, such as API Gateway, DynamoDB, and Amazon S3, via Datadog’s Forwarder function.
Using the Datadog Lambda extension means you no longer need to maintain a separate piece of infrastructure or pay for additional data storage and processing in order to monitor the performance of your functions.
In this post, we’ll show how easy it is to install Datadog’s Lambda extension and start (or continue) monitoring your serverless applications.
Deploy Datadog’s Lambda extension across all your functions
The Lambda extension is distributed as a Lambda Layer or, if you deploy functions as container images, as a Docker dependency—both methods support Node.js and Python runtimes. The extension works in conjunction with the Datadog Lambda library to generate telemetry data and send it to Datadog, so you will need to install the library first.
Then, add the Lambda Layer for the extension to your functions with the following Amazon Resource Name (ARN):
EXTENSION_VERSION with the appropriate values for your application. Note that you will need to use at least version 7 of Datadog’s Lambda extension.
If you are using tools like AWS SAM or the Serverless Framework to manage your functions, you can simplify the installation process even further via Datadog’s CloudFormation macro and Serverless plugin. These tools can be configured to automatically add the Datadog Lambda library and extension to your functions in order to seamlessly collect and send telemetry data. You can check out our documentation for more details about using these or other available methods to collect data from your Lambda functions.
Faster setup, same visibility into your functions
Once you have configured the Lambda extension, enhanced metrics—such as the estimated cost and memory usage of your functions—custom metrics, traces, and function logs will appear in Datadog in real time. You can use Datadog’s Serverless homepage to monitor all of your functions in one place and use tags to easily compare performance across specific groups of functions, such as those that support a business-critical application.
For deeper visibility into function performance, Datadog surfaces actionable insights that you can use to determine which functions are performing poorly and find the root cause of an issue. For example, Datadog will flag functions with consistently high memory utilization and provide more details, such as the Lambda resources that triggered the invocations.
An easier, cost-effective way to monitor Lambda functions
With Datadog’s Lambda extension, you can continue monitoring your functions without the added cost or complexity of using a separate piece of infrastructure to forward Lambda data to Datadog. If you don’t already use Datadog to monitor your Lambda functions, you can check out our documentation to learn more or sign up for a free 14-day trial to start monitoring your serverless applications today.