Distributed tracing that helps you monitor and troubleshoot your serverless applications.
For Node.js functions:
npm install epsagon
For Python functions:
pip install epsagon
If you are using
serverless-python-requirements plugin, also add
epsagon to your
Using the Serverless Framework:
sls plugin install --name serverless-plugin-epsagon
Or using NPM:
npm install --save-dev serverless-plugin-epsagon
When installing with NPM, add the plugin to your
plugins: - serverless-plugin-epsagon
For the best results, make sure this is the first plugin specified in your plugins list.
When using this plugin, make sure to use just this method for tracing. You don't need to manually copy or import the epsagon library to your code, nor enable the auto-tracing.
To get started with the plugin, open your
serverless.yml, and add the following snippet in the
custom: epsagon: token: epsagon-token appName: app-name-stage
You can find your token in the Epsagon settings page.
The plugin will be activated automatically during
sls package and
sls invoke local events automatically.
To cleanup any Epsagon-related files run
sls epsagon clean and it will clean up files after deployment (can happen when you stop in the middle of a deployment)
These options are defined at the service level, under the
serverless.yml file. Any function level option will override options
||Epsagon account token. You can find your token in the Epsagon settings page.|
||When set to true it disables Epsagon for the entire service. When this option is active wrapping your functions with Epsagon will be skipped.|
||Whether to send only the metadata (
||Customize the name of the directory Epsagon stores its handlers in. Do not use this option unless you know what you are doing.|
||Customize the path of your
||The address of the trace collector to send trace to|
||May contain strings (will perform a loose match, so that First Name also matches first_name)|
||Ignore HTTP calls to specific domains|
These options are defined at the function level, under the
epsagon member of your function in the
Configuring the values at the function level, will override the service level configurations.
functions: example-func: handler: handler.handle epsagon: wrapper: lambda_wrapper disable: true
||When set to true it disables Epsagon for the function.|
lambda_wrapper- regular lambda wrapper
step_lambda_wrapper- Used to wrap step functions
python_wrapper- Used to wrap regular Python functions (doesn't have to run on Lambda)
lambdaWrapper- regular lambda wrapper
stepLambdaWrapper- Used to wrap step functions
nodeWrapper- Used to wrap regular Node functions (doesn't have to run on Lambda)
Yes. you can use webpack or any serverless plugins utilizing webpack with
this plugin. Just make sure to specify this plugin before any other
plugin in your
plugins: - serverless-plugin-epsagon - serverless-webpack - any-other-plugin
In order to get the full tracing ability of epsagon, please specify any packages that should be traced (e.g. aws-sdk, pg, mongodb) as external in your webpack config.
Yes. Just make sure to specify this plugin first in your
During deployment, the plugin creates
epsagon_handlers/ dir to wrap the function. Please make sure this dir is not excluded in the configuration.
node_modules must be included in the function package being deployed, make sure that
node_modules is not excluded somewhere. An example bellow of how your
serverless.yml could look like:
... package: individually: true exclude: - ./** # Excludes everything include: # Include necessary dependencies for your function to work - "node_modules/**" - "epsagon_handlers/**" ... functions: helloWorld: handler: helloWorld.handler package: include: - helloWorld.js # Include only your function ...
Epsagon's Node library must be installed in order to use this plugin!error:
The plugin verifies that
epsagon module exists on your
./package.json before deployment.
In some cases, the
package.json might be in a different path. You can easily update it using
packageJsonPath parameter, for example:
custom: epsagon: packageJsonPath: `../../dir/package.json`
No. Make sure to choose only a single way to trace your functions.
If you are using a relative path to a local file in your Lambda function, using the plugin might cause some issues. The reason for that is that the plugin changes the location of your Lambda handler.
If you have any issue around using the library or the product, please don't hesitate to:
If you encounter a bug with the Epsagon library for Node.js, we want to hear about it.
When opening a new issue, please provide as much information about the environment:
The GitHub issues are intended for bug reports and feature requests. For help and questions about Epsagon, use the help widget inside the product.
Provided under the MIT license. See LICENSE for details.
Copyright 2020, Epsagon
Latest commit b2f54ec on Sep 24, 2017