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

@sentienguard/apm

v1.0.24

Published

SentienGuard APM SDK - Minimal, production-safe application performance monitoring

Downloads

540

Readme

@sentienguard/apm

Minimal, production-safe APM SDK for Node.js applications. Zero-config setup with automatic instrumentation.

Installation

npm install @sentienguard/apm

Quick Start

// If using dotenv, import it first
import 'dotenv/config';

// Then import the SDK (before other app modules for best instrumentation coverage)
import '@sentienguard/apm';

// Your app code
import express from 'express';
const app = express();
// ...

Set environment variables:

SENTIENGUARD_APM_KEY=your-app-key
SENTIENGUARD_SERVICE=my-api

That's it. The SDK automatically instruments your application and sends metrics to SentienGuard.

Configuration

All configuration is via environment variables:

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | SENTIENGUARD_APM_KEY | Yes | - | Your application's APM key | | SENTIENGUARD_SERVICE | Yes | - | Service name (e.g., orders-api) | | SENTIENGUARD_ENV | No | production | Environment (production, staging, development) | | SENTIENGUARD_ENDPOINT | No | https://sentienguard-dev.the-algo.com/api/v1 | SentienGuard backend URL | | SENTIENGUARD_FLUSH_INTERVAL | No | 10 | Metrics flush interval in seconds |

Note: If SENTIENGUARD_APM_KEY or SENTIENGUARD_SERVICE is missing, the SDK disables itself silently without affecting your application.

What Gets Tracked

  • HTTP Requests - Incoming requests with method, route, status, and latency
  • Dependencies - Outgoing HTTP/HTTPS calls to external services
  • Errors - Uncaught exceptions and unhandled rejections

Framework Integration

Express

For better route extraction, add the middleware:

import 'dotenv/config'; // if using dotenv
import '@sentienguard/apm';
import { expressMiddleware, expressErrorMiddleware } from '@sentienguard/apm';
import express from 'express';

const app = express();

// Add early in middleware chain
app.use(expressMiddleware());

// Your routes
app.get('/users/:id', (req, res) => { ... });

// Add error middleware last
app.use(expressErrorMiddleware());

Fastify

import 'dotenv/config'; // if using dotenv
import '@sentienguard/apm';
import { fastifyPlugin, fastifyErrorHandler } from '@sentienguard/apm';
import Fastify from 'fastify';

const app = Fastify();

// Register plugin
app.register(fastifyPlugin);

// Add error handler
app.setErrorHandler(fastifyErrorHandler);

API Reference

Functions

import {
  shutdown,      // Graceful shutdown (flushes pending metrics)
  getStatus,     // Get SDK status and stats
  flush,         // Force flush metrics now
  isEnabled      // Check if SDK is enabled
} from '@sentienguard/apm';

Graceful Shutdown

The SDK automatically handles SIGTERM and SIGINT signals. For manual shutdown:

import { shutdown } from '@sentienguard/apm';

process.on('exit', async () => {
  await shutdown();
});

Check Status

import { getStatus } from '@sentienguard/apm';

console.log(getStatus());
// {
//   enabled: true,
//   initialized: true,
//   config: { service: 'my-api', environment: 'production', flushInterval: 10 },
//   stats: { requests: 150, dependencies: 45, errors: 2 }
// }

Browser / Frontend Monitoring (RUM)

For React, Vue, or other browser apps, bundlers automatically use the browser build. Call init() explicitly in your app entry (client-side only):

import SentienGuard from '@sentienguard/apm';

SentienGuard.init({
  apiKey: 'your-apm-key',
  service: 'my-frontend',
  endpoint: 'https://your-backend.com/api/v1/apm/ingest',
  environment: 'production'
});

What Gets Tracked (Browser)

  • Outgoing fetch/XHR — API calls from the browser with latency and errors
  • Core Web Vitals — LCP, FID, INP, CLS
  • Page load timing — TTFB, DOM ready, full load
  • JS errors — Unhandled exceptions and promise rejections
  • SPA routes — Client-side navigation via History API

Browser Configuration

| Option | Required | Default | Description | |--------|----------|---------|-------------| | apiKey | Yes | - | APM application key | | service | Yes | - | Frontend service name | | endpoint | No | SentienGuard dev ingest URL | Full ingest URL | | environment | No | production | Environment name | | flushInterval | No | 10 | Flush interval in seconds | | debug | No | false | Enable SDK debug logging |

Requirements

  • Node.js >= 16.0.0 (server SDK)
  • Modern browser with PerformanceObserver support (browser SDK)

License

MIT