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

@gchat-notifier/node

v0.8.3

Published

Professional Google Chat notification SDK for Node.js. Capture errors and latency alerts via clean GChat Card webhooks.

Readme

@gchat-notifier/node

Error capturing SDK for Node.js that sends notifications to Google Chat via webhook cards.

Features

  • 🚨 Automatic error capture - Catch and report exceptions with stack traces
  • ⏱️ Latency monitoring - Track and alert on endpoint performance
  • 🔗 Framework integrations - Built-in support for Express, Fastify, and NestJS
  • 🏷️ Context enrichment - Add tags, extra data, and request info to events
  • 🛡️ Privacy-aware - Automatic redaction of sensitive headers
  • Rate limiting - Prevent webhook flooding
  • 🎯 TypeScript-first - Full type safety and IntelliSense support

Installation

npm install @gchat-notifier/node
  • Framework support: Express, Fastify, and NestJS integrations built-in.
  • Deduplication: Error fingerprinting prevents message flooding.
  • Security: Automatic header redaction for sensitive data.

Read Full API Documentation →

Quick Start

Error Capturing

import { GChatNotifier } from "@gchat-notifier/node";

GChatNotifier.init({
  webhookUrl: "https://chat.googleapis.com/v1/spaces/...",
});

// Capture an error with optional request context
try {
  throw new Error("API Timeout");
} catch (error) {
  GChatNotifier.captureException(error, {
    url: "/api/v1/data",
    method: "POST"
  });
}

Latency Monitoring

GChatNotifier.captureLatency({
  endpoint: "/api/v1/users",
  durationMs: 450,
  thresholdMs: 300 // Optional: shows threshold in the card
});

Configuration Options

interface SDKOptions {
  /** Google Chat webhook URL (required) */
  webhookUrl: string;
  
  /** Service/application name */
  service?: string;
  
  /** Environment (e.g., 'production', 'staging') */
  environment?: string;
  
  /** Application version/release */
  release?: string;
  
  /** Enable debug logging to console */
  debug?: boolean;
  
  /** Maximum events per minute (default: 30) */
  maxEventsPerMinute?: number;
  
  /** Transform or filter events before sending */
  beforeSend?: (event: GChatEvent) => GChatEvent | null;
}

Enriching Events with Context

Use withScope to add contextual information to captured events:

GChatNotifier.withScope((scope) => {
  scope.setTag("userId", "12345");
  scope.setTag("feature", "checkout");
  scope.setExtra("cart", { items: 3, total: 99.99 });
  
  GChatNotifier.captureException(error);
});

Framework Integrations

Express

import express from "express";
import { GChatNotifier, gchatExpress } from "@gchat-notifier/node";

const app = express();

GChatNotifier.init({ webhookUrl: "..." });

// Your routes
app.get("/", (req, res) => {
  res.send("Hello!");
});

// Error handler - must be after all routes
app.use(gchatExpress());

app.listen(3000);

Fastify

import Fastify from "fastify";
import { GChatNotifier, gchatFastify } from "@gchat-notifier/node";

const fastify = Fastify();

GChatNotifier.init({ webhookUrl: "..." });

// Register the plugin
await fastify.register(gchatFastify);

fastify.listen({ port: 3000 });

NestJS

import { Module, APP_FILTER } from "@nestjs/core";
import { GChatNotifier, GChatExceptionFilter } from "@gchat-notifier/node";

GChatNotifier.init({ webhookUrl: "..." });

@Module({
  providers: [
    {
      provide: APP_FILTER,
      useClass: GChatExceptionFilter,
    },
  ],
})
export class AppModule {}

Filtering Events

Use beforeSend to filter or modify events before they're sent:

GChatNotifier.init({
  webhookUrl: "...",
  beforeSend: (event) => {
    // Don't send 404 errors
    if (event.message.includes("Not Found")) {
      return null;
    }
    
    // Add custom data
    event.extra = {
      ...event.extra,
      serverVersion: process.env.VERSION,
    };
    
    return event;
  },
});

Types

The package exports the following types for TypeScript users:

import type { 
  GChatEvent, 
  SDKOptions, 
  Severity 
} from "@gchat-notifier/node";

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

License

MIT