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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aidra/pmx-io

v9.70.0

Published

In-process instrumentation for Node.js and Bun apps run by pmx, or reporting to prodman on their own (@pm2/io compatible)

Readme

@aidra/pmx-io

In-process instrumentation for Node.js and Bun apps that report to prodman: metrics, custom actions, exceptions, events, logs, CPU and heap profiling, and distributed tracing with database and message-broker integrations. It keeps the @pm2/io API, so code written for PM2.io works unchanged.

  • Run by pmx: pmx injects this library into every app it starts; nothing to install. An installed copy stays idle and require returns the injected instance.
  • Run by PM2 / pm2_prodman: reports through the pmx daemon, like @pm2/io.
  • Standalone (a container's node app.js, an ECS task, a worker): connects to prodman itself as a one-process agent.

Node.js 18 or later, or Bun 1.1 or later. No dependencies.

Install

npm install @aidra/pmx-io

Code that requires @pm2/io can keep doing so: install the package under that name.

npm install @pm2/io@npm:@aidra/pmx-io

Standalone mode

Set the bucket keys (prodman: Bucket settings → Connect servers) and an app name:

PRODMAN_URL=https://prodman.example.com
PMX_PUBLIC_KEY=<public key>
PMX_SECRET_KEY=<secret key>
PMX_APP_NAME=orders-api

The pm2 names (PM2_PUBLIC_KEY, PM2_SECRET_KEY, PM2_APP_NAME, PM2_MACHINE_NAME) are still accepted for pm2 compatibility. When both forms are set, the PMX_ name wins (one warning names both, never the values). The PMX_ forms need @aidra/pmx-io 9.33 or later (pmx 9.33+); the standalone root removes the keys under both names from its environment, so children never see them. See the environment variable reference.

Then load the library without changing code:

npx pmx-io-node run -- node server.js
node --require @aidra/pmx-io/standalone server.js
NODE_OPTIONS='--import @aidra/pmx-io/standalone.mjs' node server.mjs

or require it first thing in the app:

const io = require('@aidra/pmx-io')
io.init({ apmOptions: { sendLogs: true, application: 'shop' } })

Settings, server names, containers and troubleshooting: prodman's documentation page Node.js apps without pmx (/docs/node-apm).

API

const io = require('@aidra/pmx-io')

io.metric({ name: 'Queue length' }).set(12)
io.counter({ name: 'Jobs done' }).inc()
io.action('flush cache', (reply) => reply({ ok: true }))
io.notifyError(new Error('payment failed'), { custom: { orderId } })

TypeScript declarations are included (index.d.ts), a superset of @pm2/io's.

License

Apache-2.0 (see LICENSE and NOTICE). This client library is open source; the pmx daemon/CLI and Prodman are commercial software.