Integrate OpenTelemetry on AWS Lambda
Dynatrace uses OpenTelemetry to monitor AWS Lambda invocations. See below for instructions.
Note: In combination with the default OpenTelemetry SDKs and APIs, you can use language-specific packages, such as Integrate OpenTelemetry .NET on AWS Lambda.
Dynatrace version 1.240+
Activate the Forward Tag 4 trace context extension OneAgent feature. In the Dynatrace menu, go to Settings > Preferences > OneAgent features.
Note: All OneAgents participating in a trace be OneAgent version 1.193+ for this setting.
You can activate AWS Lambda from either the Dynatrace Hub or the Deploy Dynatrace page.
- In the Dynatrace menu, go to Dynatrace Hub.
- Find and select AWS Lambda.
- Select Activate AWS Lambda.
- In the Dynatrace menu, go to Deploy Dynatrace.
- Select Start installation.
- Select AWS Lambda.
Note: Configuration options regarding Lambda layers don't apply here.
Choose monitoring solution and configuration method
On Enable Monitoring for AWS Lambda Functions, under Select monitoring solution, select AWS Lambda OpenTelemetry package dropdown item. Under Select a configuration method, select your preferred configuration method from the dropdown menu. Make sure you set all properties for the selected method before copying the generated configuration snippets.
Note: Only Configure with environment variables and Configure with JSON file are applicable here.
Define environment variables for the AWS Lambda function that you want to monitor.
Copy the JSON snippet to the root folder of your AWS Lambda functions deployment into the
Specify a Dynatrace API endpoint optional
Specify a Dynatrace API endpoint where you want to receive monitoring data. Typically, to reduce network latency, you deploy a Dynatrace ActiveGate close to (the same region as) the AWS Lambda function that you want to monitor.
Instrument the function code
Adding the required API calls to monitor function invocations via OpenTelemetry is specific to languages and their respective OpenTelemetry distribution.
To get detailed instructions for different languages supported by Dynatrace, see Integrate OpenTelemetry .NET on AWS Lambda.
The Dynatrace AWS Lambda integration doesn't capture IP addresses of outgoing HTTP requests. This results in unmonitored hosts if the called service isn't monitored with Dynatrace OneAgent.