IOpipe has been acquired by New Relic. Please migrate to the equivalent New Relic Serverless plugin. Check out our migration guide for more information.
A Serverless plugin to add IOpipe observability using AWS Lambda Layers without requiring a code change.
- serverless >= 1.34.0
- Supports Node.js and Python runtimes (more runtimes to come)
- No code change required to enable IOpipe
- Bundles all of IOpipe's observability plugins in a single layer
With NPM:
npm install --save-dev serverless-iopipe-layersWith yarn:
yarn add --dev serverless-iopipe-layersAdd the plugin to your serverless.yml:
plugins:
- serverless-iopipe-layersGet a free IOpipe token and plug it into your serverless.yml:
custom:
iopipe:
token: your-iopipe-token-hereDeploy and you're all set.
This plugin wraps your handlers without requiring a code change. If you're currently using IOpipe, you can remove the wrapping code you currently have and this plugin will do it for you automatically.
The following config options are available via the iopipe section of the custom section of your serverless.yml:
The IOpipe token to use.
Whether or not to enable debug mode. Must be a boolean value.
custom:
iopipe:
debug: trueAn array of functions to exclude from automatic wrapping.
custom:
iopipe:
exclude:
- excluded-func-1
- another-excluded-funcPin to a specific layer version. The latest layer ARN is automatically fetched from the IOpipe Layers API
Whether or not to prepend the IOpipe layer. Defaults to false which appends the layer.
custom:
iopipe:
prepend: trueThis plugin currently supports the following AWS runtimes:
- nodejs6.10 (deprecated)
- nodejs8.10
- nodejs10.x
- python2.7
- python3.6
- python3.7
When using with serverless-webpack it is highly recommended to use the nodejs10.x runtime as this runtime does not require a helper script. For earlier Node.js runtimes a helper script is required which must be included via your webpack.config.js. The serveless-iopipe-layers plugin must follow the serverless-webpack plugin in your serverless.yml. See here for an example.
When using with the Serverless Enterprise Plugin, because this plugin uses a similar method to wrap functions, a helper script must be used. If using with serverless-webpack, the helper script must be included in your webpack.config.js as described above.
- Doesn't currently support local invocation
Apache 2.0