Package Exports
- serverless-lumigo
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-lumigo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
serverless-lumigo
Serverless framework plugin to auto-install the Lumigo tracer for Node.js and Python functions.
TOC
Install
Run npm install
in your Serverless project.
$ npm install --save-dev serverless-lumigo
Add the plugin to your serverless.yml file
plugins:
- serverless-lumigo
Node.js functions
For Node.js functions, the plugin would install the latest version of the Lumigo tracer for Node.js during serverless package
and serverless deploy
. It would also wrap your functions as well, so you only need to configure your Lumigo token in a custom
section inside the serverless.yml
.
For example:
provider:
name: aws
runtime: nodejs10.x
custom:
lumigo:
token: <YOUR TOKEN GOES HERE>
Python functions
For Python functions, we recommend using the serverless-python-requirements plugin to help you manage your dependencies. You should have the following in your requirements.txt
:
--index-url https://1wmWND-GD5RPAwKgsdvb6DphXCj0vPLs@pypi.fury.io/lumigo/
--extra-index-url https://pypi.org/simple/
lumigo_tracer
This installs the Lumigo tracer for Python, and this plugin would wrap your functions during serverless package
and serverless deploy
.
As with Node.js functions, you also need to configure the Lumigo token in a custom
section in the serverless.yml
.
provider:
name: aws
runtime: python3.7
custom:
lumigo:
token: <YOUR TOKEN GOES HERE>