Overview

Instrument your AWS Lambda applications with a Datadog Lambda Library to collect traces, enhanced metrics, and custom metrics.

A diagram that shows how Datadog receives telemetry from your instrumented AWS Lambda application. Your Lambda application, instrumented with a Datadog Lambda Library, sends logs, traces, enhanced metrics, and custom metrics to the Datadog Lambda Extension, which then pushes this data to Datadog.

Quick start

A sample application is available on GitHub with instructions on how to deploy with multiple runtimes and infrastructure-as-code tools.

The quick start process configures your Lambda functions on the fly. To instrument Lambda functions permanently, see the detailed instructions in the next section.

Instrumentation instructions

For Node.js and Python runtimes, you can use remote instrumentation to add instrumentation to your AWS Lambda functions and keep them instrumented securely. See Remote instrumentation for AWS Lambda.

For other Lambda runtimes (or to instrument your Node.js or Python functions without remote instrumentation) see detailed instrumentation instructions:

Python
Node.js
Ruby
Java
go
.NET

Advanced configurations

After you’re done with instrumentation and you’ve set up telemetry collection, you can use Configure Serverless Monitoring for AWS Lambda to:

  • connect your metrics, traces, and logs using tags
  • collect telemetry from AWS resources such as API Gateway, AppSync, and Step Functions
  • capture the request and response payloads for individual Lambda invocations
  • link errors of your Lambda functions to your source code
  • filter or scrub sensitive information from logs or traces

Further Reading

Additional helpful documentation, links, and articles: