Package Exports
- serverless-plugin-epsagon
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-plugin-epsagon) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Epsagon Serverless Framework Plugin
Epsagon's plugin for the Serverless Framework.
Installation
Install Epsagon's Library
For Node.js functions:
npm install epsagon
For Python functions:
pip install epsagon
Install The Plugin
Using the Serverless Framework:
sls plugin install --name serverless-plugin-epsagon
Or using NPM:
npm install serverless-plugin-epsgon
When installing with NPM, add the plugin to your serverless.yml
file:
plugins:
- serveless-plugin-epsagon
Configure The Plugin
To get started with the plugin, all you have to do is configure your serverless.yml with Epsagon's token, and an optional application name:
custom:
epsagon:
token: your-token-here
appName: optional-application-name
And you are good to go! The plugin will be activated during sls deploy
,
sls package
and sls invoke local
events automatically.
You can get your epsagons token from the settings page in the dashboard. Follow our documentation for more details.
Additional Commands
sls epsagon clean
will clean up remaining Epsagon files in case some were left after deployment (when you break in the middle of a deployment for example)
Options
Service Level Options
These options are defined at the service level, under the custom.epsagon
member
of your serverless.yml
file. Any function level option will override options
defined here. Available options:
disable
- When set to true, disables Epsagon for the entire service. When this option is active wrapping your functions with Epsagon will be skipped.metadataOnly
- When set to true, will cause Epsagon to report only the metadata of the operations to Epsagon's infrastracture instead of the operation's full data.handlersDirName
- Customize the name of the directory epsagon stores its handlers in. Do not use this option unless you know what you are doing :)
Function Level Options
These options are defined at the function level, under the epsagon
member
of your function in the serverless.yml
file. Available options:
disable
- When set to true, disables Epsagon for this specific function.wrapper
- The wrapper to use to wrap this function. If not specified defaults to Epsagon's regular lambda wrapper. available wrappers:- for Python:
lambda_wrapper
- regular lambda wrapperstep_lambda_wrapper
- Used to wrap step functionspython_wrapper
- Used to wrap regular Python functions (doesn't have to run on Lambda)
- for Node.js:
lambdaWrapper
- regular lambda wrapperstepLambdaWrapper
- Used to wrap step functionsnodeWrapper
- Used to wrap regular Node functions (doesn't have to run on Lambda)
- for Python: