Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

serverless-newrelic-lambda-layers

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serverless-newrelic-lambda-layers

Serverless plugin for NewRelic APM AWS Lambda layers.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33K
increased by4.81%
Maintainers
1
Weekly downloads
 
Created
Source

serverless-newrelic-lambda-layers

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

Requirements

  • serverless >= 1.34.0
  • Set up the New Relic AWS Integration (only the set-up-lambda-integration step is required)

Features

  • Supports Node.js and Python runtimes (more runtimes to come)
  • No code change required to enable New Relic
  • Bundles New Relic's agent in a single layer
  • Configures CloudWatch subscription filters automatically

Install

With NPM:

npm install --save-dev serverless-newrelic-lambda-layers

With yarn:

yarn add --dev serverless-newrelic-lambda-layers

Add the plugin to your serverless.yml:

plugins:
  - serverless-newrelic-lambda-layers

If you don't yet have a New Relic account, sign up here. Then set up the New Relic AWS Integration (only the set-up-lambda-integration step is required).

Get your New Relic Account ID and plug it into your serverless.yml:

custom:
  newRelic:
    accountId: your-new-relic-account-id-here

Deploy:

sls deploy

And you're all set.

Usage

This plugin wraps your handlers without requiring a code change. If you're currently using a New Relic agent, 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 newRelic section of the custom section of your serverless.yml:

accountId (required)

Your New Relic ACcount ID.

custom:
  newRelic:
    accountId: your-account-id-here
trustedAccountKey (optional)

Only required if your New Relic account is a sub-account. This needs to be the account ID for the root/parent account.

custom:
  newRelic:
    accountId: your-sub-account-id
    trustedAccountKey: your-parent-account-id
debug (optional)

Whether or not to enable debug mode. Must be a boolean value. This sets the log level to debug.

custom:
  newRelic:
    debug: true
exclude (optional)

An array of functions to exclude from automatic wrapping.

custom:
  newRelic:
    exclude:
      - excluded-func-1
      - another-excluded-func
layerArn (optional)

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

custom:
  newRelic:
    layerArn: arn:aws:lambda:us-east-1:451483290750:layer:NewRelicPython37:2
prepend (optional)

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

custom:
  newRelic:
    prepend: true

Supported Runtimes

This plugin currently supports the following AWS runtimes:

  • nodejs8.10
  • nodejs10.x
  • python2.7
  • python3.6
  • python3.7

Keywords

FAQs

Package last updated on 01 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc