Lambda Configuration (examples)
Service Maps is an Enterprise-only feature
Option 1: Datadog Dual Shipping (Recommended)
Wherever you can pass in the environment to the Datadog Agent, pass in this value:
DD_APM_ADDITIONAL_ENDPOINTS={"https://in-datadog.codesee.io": ["<CodeSee Ingestion Token here>"]}
Option 2: Running dd-bridge as a container
Example AWS Lambda Serverless
configuration
Serverless
configurationcustom:
# serverless-plugin-datadog
datadog:
enabled: true
addExtension: true
addLayers: true
apiKey: <Datadog API Key>
enableDDLogs: <true|false>
enableDDTracing: true
captureLambdaPayload: true
env: <name of environment (e.g. production)>
...
stageVars:
production:
vpc:
environment:
DD_APM_DD_URL: "<URL of dd-bridge>"
DD_APM_NON_LOCAL_TRAFFIC: "true"
DD_APM_ENABLED: "true"
...
Using the dd-bridge Lambda Layer
AWS Console
Starting with a lambda that already has the Datadog extension installed on it:
Click on Add a Layer
Then you’ll want to click “Specify an ARN”, paste in the arn for the codesee-dd-bridge extension which is:
arn:aws:lambda:us-east-1:666523192759:layer:codesee-dd-bridge:6
arn:aws:lambda:us-east-2:666523192759:layer:codesee-dd-bridge:13
Then click verify
You should see the following, and then click ‘Add’
Your layers should look something like this:
Now we need to configure the environment for your lambda so that we redirect Datadog to the bridge. Start by clicking on Configuration and then adding the following key/value pairs:
CODESEE_BRIDGE_FORWARD_HOST https://in-datadog.codesee.io
CODESEE_BRIDGE_TOKEN <CodeSee Ingestion Token>
DD_APM_DD_URL http://127.0.0.1:8080
Also ensure that the following are all set to true. They probably are if you were already getting data in Datadog.
DD_APM_ENABLED true
DD_APM_NON_LOCAL_TRAFFIC true
DD_TRACE_ENABLED true
For example:
And that’s it!
Terraform
If you are using something like Terraform, you’ll need to configure it to attach the extension arn to the lambda, and set the environment variables like we did here.
First you’ll need to add the layer to your lambda:
resource "aws_lambda_function" "example" {
...
layers = [
"arn:aws:lambda:us-east-2:666523192759:layer:codesee-dd-bridge:13"
]
}
Then in the same resource, you’ll want to set all the environment variables:
resource "aws_lambda_function" "example" {
...
environment {
variables = {
...
CODESEE_BRIDGE_FORWARD_HOST = "https://in-datadog.codesee.io"
CODESEE_BRIDGE_TOKEN = "<Ingestion Token>"
DD_APM_DD_URL = "http://127.0.0.1:8080/"
}
}
}
Serverless
If you are using the Serverless Framework, then you’ll want to add a layer into your lambda definition, like the following:
layers:
- arn:aws:lambda:us-east-2:666523192759:layer:codesee-dd-bridge:13
Updated 12 months ago