
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
serverless-plugin-datadog
Advanced tools
Serverless plugin to automatically instrument python and node functions with datadog tracing
This serverless framework plugin automatically instruments your Python and NodeJS Lambda functions with Datadog's native Lambda Layers. You can use this function to collect traces, and custom metrics.
You can install the plugin with one of the following commands. Keep in mind, you will need to bundle this package with your function manually.
yarn add --dev serverless-plugin-datadog # Yarn users
npm install --save-dev serverless-plugin-datadog # NPM users
Then in your serverless.yml add the following:
plugins:
- serverless-plugin-datadog
This plugin attaches the Datadog Lambda Layers for Node.js and Python to your functions. At deploy time, it generates new handler functions that wrap your existing functions and initializes the Lambda Layers.
You can configure the library by add the following section to your serverless.yml
:
custom:
datadog:
# Whether to add the Lambda Layers, or expect the user to bring their own
addLayers: true
# Datadog API Key, only necessary when using metrics without log forwarding
apiKey: ""
# Whether the log forwarder integration is enabled by default
flushMetricsToLogs: false
custom:
datadog:
# Add one of the following variables to override it's default
# Whether to add the Lambda Layers, or expect the user to bring their own
addLayers: true
# Datadog API Key, only necessary when using metrics without log forwarding
apiKey: ""
# Datadog API Key encrypted using KMS, only necessary when using metrics without log forwarding
apiKMSKey: ""
# Which Site to send to, (should be datadoghq.com or datadoghq.eu)
site: datadoghq.com
# The log level, (set to DEBUG for extended logging)
logLevel: "info"
# Whether the log forwarder integration is enabled by default
flushMetricsToLogs: false
datadog-lambda-layer-js
or datadog-lambda-layer-python
?You can use your own version of those libraries by setting 'addLayers' to false in the datadog configuration block. Just make sure to bundle those libaries with your Lambda functions.
Make sure serverless-datadog is above the serverless-webpack entry in your serverless.yml
plugins:
- serverless-plugin-datadog
- serverless-webpack
When using serverless webpack, the plugin will assume you are using es6 module format. If that's not the case, you can manually configure nodeModuleType
.
custom:
datadog:
nodeModuleType: "node" # 'typescript' | 'es6'
If you have the addLayers option enabled, you may also want to add 'datadog-lambda-js' and 'dd-trace' to the externals section of your webpack config.
Make sure serverless-datadog is above the serverless-typescript entry in your serverless.yml. The plugin will detect automatically .ts files.
plugins:
- serverless-plugin-datadog
- serverless-typescript
If you encounter a bug with this package, we want to hear about it. Before opening a new issue, search the existing issues to avoid duplicates.
When opening an issue, include your Serverless Framework version, Python/Node.js version, and stack trace if available. In addition, include the steps to reproduce when appropriate.
You can also open an issue for a feature request.
If you find an issue with this package and have a fix, please feel free to open a pull request following the procedures.
Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0.
This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2019 Datadog, Inc.
FAQs
Serverless plugin to automatically instrument python and node functions with datadog tracing
The npm package serverless-plugin-datadog receives a total of 86,709 weekly downloads. As such, serverless-plugin-datadog popularity was classified as popular.
We found that serverless-plugin-datadog demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.