Automatically wrap your AWS Lambda functions with Thundra for the serverless framework ⚡️ https://thundra.io
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets
src
.gitignore
.prettierrc.json
LICENSE
README.md
package-lock.json
package.json
webpack.config.js

README.md

serverless-plugin-thundra

serverless npm version

Automatically wrap your AWS Lambda functions with Thundra for the serverless framework ⚡️ https://thundra.io

Check out Thundra docs for more information.

Installation

npm install serverless-plugin-thundra

Usage

Thundra's serverless plugin allows you to automatically wrap your Python and Node.js Lambda functions to enable monitoring with Thundra.

Please ensure that along with this library, you also dowload the respective library of the Thundra agent related to the language in which you are developing.

For Thundra's Python agent:

pip3 install thundra -t .

For Thundra's Node agent:

npm install @thundra/core --save

After installing the respective Thundra agent and Thundra's serverless plugin with the npm install serverless-plugin-thundra. Add it to your serverless plugins by including itunder the plugins section of your '.yml' file.

plugins:
  - serverless-plugin-thundra

add-servless-plugin

Ensure that the plugin is the first plugin you add under plugins

Furthermore, add the thundra component under custom with apiKey under that, as seen below:

custom:
  thundra:
    apiKey: <YOUR THUNDRA API KEY>
....
provider:
  environment:
    thundra_apiKey: ${self.custom.thundra.apiKey}

Configuration

You can configure Thundra's serverless plugin to disable specific functions, or the whole plugin in general.

Disable Plugin:

You may disable Thundra's serverless plugin by using the disable variable under the thundra component which you added under custom when adding the plugin to your '.yml' file.

custom:
  thundra:
    apiKey: <YOUR THUNDRA API KEY>
    disable: true

Disable Specific Functions:

You may disable automatic wrapping of specific functions by using the disableAutoWrap variable when defining your functions under the functions component.

functions:
  hello-world-test:
    name: hello-world-test
    handler: index.handler
    disableAutoWrap: false