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-lumigo

v1.14.5

Published

Serverless framework plugin to auto-install the Lumigo tracer

Downloads

28,391

Readme

serverless-lumigo

CircleCI serverless version License codecov

Serverless framework plugin to auto-install the Lumigo tracer for Node.js and Python functions.

TOC

Install

Run npm install in your Serverless project.

$ npm install --save-dev serverless-lumigo

Add the plugin to your serverless.yml file

plugins:
  - serverless-lumigo

Node.js functions

For Node.js functions, the plugin would install the latest version of the Lumigo tracer for Node.js during serverless package and serverless deploy. It would also wrap your functions as well, so you only need to configure your Lumigo token in a custom section inside the serverless.yml.

For example:

provider:
  name: aws
  runtime: nodejs12.x

custom:
  lumigo:
    token: <YOUR TOKEN GOES HERE>
    nodePackageManager: <npm, pnpm or yarn>

In case you want to pin the specific tracer version use pinVersion attribute.

For example

provider:
  name: aws
  runtime: nodejs12.x

custom:
  lumigo:
    token: <YOUR TOKEN GOES HERE>
    pinVersion: 1.31.1

In case you want to manage the Lumigo tracer dependency yourself - e.g. you want to use Lerna or Webpack, and can't have this plugin install the Lumigo tracer on your behalf on every deployment - then you can also disable the NPM install process altogether.

provider:
  name: aws
  runtime: nodejs12.x

custom:
  lumigo:
    token: <YOUR TOKEN GOES HERE>
    skipInstallNodeTracer: true # defaults to false

In case you are using ES Modules for Lambda handlers.

provider:
  name: aws
  runtime: nodejs14.x

custom:
  lumigo:
    token: <YOUR TOKEN GOES HERE>
    nodeUseESModule: true
    nodeModuleFileExtension: js

Python functions

For Python functions, we recommend using the serverless-python-requirements plugin to help you manage your dependencies. You should have the following in your requirements.txt:

lumigo_tracer or lumigo-tracer

This installs the Lumigo tracer for Python, and this plugin would wrap your functions during serverless package and serverless deploy.

You also need to configure the Lumigo token in a custom section in the serverless.yml.

provider:
  name: aws
  runtime: python3.10
custom:
  lumigo:
    token: <YOUR TOKEN GOES HERE>

In case you are not using requirements.txt to manage your requirements then you can add skipReqCheck and set it to true

custom:
  lumigo:
    token: 1234
    skipReqCheck: true

Configuration

In order to pass parameters to the tracer, just add them as keys to lumigo custom configuration. For example:

custom:
  lumigo:
    token: <YOUR TOKEN GOES HERE>
    step_function: true

Function Scope Configuration

You can configure lumigo behavior for individual functions as well:

  • enabled - Allows one to enable or disable lumigo for specific a specific function

    functions:
      foo:
        lumigo:
          enabled: false
    
      bar:
        lumigo:
          enabled: ${self:custom.enabledLumigo}

How to test

Run npm run test:all