npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

serverless-iopipe-layers

v0.4.0

Published

Serverless plugin to add IOpipe lambda layers.

Downloads

44

Readme

serverless-iopipe-layers

A Serverless plugin to add IOpipe observability using AWS Lambda Layers without requiring a code change.

Requirements

  • serverless >= 1.34.0

Features

  • 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

Install

With NPM:

npm install --save-dev serverless-iopipe-layers

With yarn:

yarn add --dev serverless-iopipe-layers

Add the plugin to your serverless.yml:

plugins:
  - serverless-iopipe-layers

Get a free IOpipe token and plug it into your serverless.yml:

custom:
  iopipe:
      token: your-iopipe-token-here

Deploy and you're all set.

Usage

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.

Config

The following config options are available via the iopipe section of the custom section of your serverless.yml:

token (required)

The IOpipe token to use.

debug (optional)

Whether or not to enable debug mode. Must be a boolean value.

custom:
  iopipe:
    debug: true

exclude (optional)

An array of functions to exclude from automatic wrapping.

custom:
  iopipe:
    exclude:
      - excluded-func-1
      - another-excluded-func

layer_arn (optional)

Pin to a specific layer version. The latest layer ARN is automatically fetched from the IOpipe Layers API

prepend (optional)

Whether or not to prepend the IOpipe layer. Defaults to false which appends the layer.

custom:
  iopipe:
    prepend: true

Supported Runtimes

This plugin currently supports the following AWS runtimes:

  • nodejs6.10 (deprecated)
  • nodejs8.10
  • nodejs10.x
  • python2.7
  • python3.6
  • python3.7

Using with serverless-webpack

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.

Using with Serverless Enterprise

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.

Limitations

  • Doesn't currently support local invocation

License

Apache 2.0