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

@nodesource/nsolid-serverless

v1.0.2

Published

Tool to build infraestructure for serverless monitoring in N|Solid

Downloads

6

Readme

@nodesource/nsolid-serverless

Description

@nodesource/nsolid-serverless is a Node.js module that provides a Command Line Interface (CLI) for setting up infrastructure related to NodeSource N|Solid in a serverless environment. The main aim of this CLI tool is to enable users to instrument their serverless functions with N|Solid, a powerful Node.js application monitoring platform.

By utilizing @nodesource/nsolid-serverless, users can easily manage various resources such as infrastructures and functions, and perform cleanup operations on them. This tool streamlines the process of configuring the necessary infrastructure so that developers can seamlessly monitor and gain valuable insights into the performance of their serverless functions using N|Solid.

Please Note: At the moment, @nodesource/nsolid-serverless only supports AWS as the serverless environment. However, we have exciting plans on our roadmap to add support for Google Cloud Functions and Azure Functions in the future. Stay tuned for updates!

Prerequisites

Before using @nodesource/nsolid-serverless, ensure that you have set up the necessary credentials for your cloud provider. Currently, only AWS is supported as the serverless environment. To set up AWS credentials, you can use the AWS Command Line Interface (CLI) and run the following command:

aws configure

Follow the prompts to enter your AWS Access Key ID, Secret Access Key, default region, and output format.

Installation

To use @nodesource/nsolid-serverless, you need to have Node.js and npm (Node Package Manager) installed on your system. If you don't have them, you can download and install them from here.

Once you have Node.js and npm set up, you can install @nodesource/nsolid-serverless globally using the following command:

npm install -g @nodesource/nsolid-serverless

Alternatively, you can use npx to run @nodesource/nsolid-serverless without installing it globally:

npx @nodesource/nsolid-serverless <resource> [command] [options]

Usage

The CLI follows the following format:

nsolid-serverless <resource> [command] [options]

<resource>

The <resource> can be one of the following:

  • infra: For managing infrastructure.
  • functions: For managing functions.
  • removeAll: For removing all resources.

[command]

The [command] applies to infra and functions resources. It can have the following values:

  • --install: Install the specified resource.
  • --update: Update the specified resource.
  • --uninstall: Uninstall the specified resource.

Common Options (Applicable to infra, functions, and removeAll)

  • --region: Specify the region where the resource will be created in your cloud environment. For example, --region us-west-2.

  • --stage: Specify the stage of the created resource. For example, --stage dev or --stage prod.

Options specific to functions

  • --functionPatterns: Filter the functions that will be monitored using a regular expression or a function name pattern. For example, --functionPatterns "myFunctionName|myFunctionName2|myFunctionName3".

  • --tracing: Enable collecting traces from the function invocations. This option is applicable only to functions.

Examples

Non-interactive mode

  • Create a new infrastructure in the eu-west-3 region and stage dev:

    nsolid-serverless infra --install --region eu-west-3 --stage dev
  • Deploy a new function and enable metrics collection in the us-east-1 region and stage prod:

    nsolid-serverless functions --install --region us-east-1 --stage prod --functionPatterns "myFunctionName|myFunctionName2"
  • Uninstall the infrastructure in the us-west-2 region and stage dev:

    nsolid-serverless infra --uninstall --region us-west-2 --stage dev

Interactive mode

Interactive mode is available when at least one of the required options (--region, --stage, --functionPatterns) is not used.

  • Install a new infrastructure:

    nsolid-serverless infra --install

    Interactive mode prompts:

    In which region do you want to deploy?
    In which stage do you want to deploy?
  • Install a new function and enable metrics collection:

    nsolid-serverless functions --install

    Interactive mode prompts:

    In which region do you want to deploy?
    In which stage do you want to deploy?
    Which functions do you want to collect metrics?
  • Uninstall a function:

    nsolid-serverless functions --uninstall

    Interactive mode prompts:

    In which region do you want to uninstall?
    In which stage do you want to uninstall?
    Which function do you want to uninstall?
  • Remove all resources:

    nsolid-serverless removeAll

Contribution

Contributions to @nodesource/nsolid-serverless are welcome. If you find any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.