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

site24x7-chaos-sdk

v1.1.2

Published

Site24x7 Labs Chaos SDK for Node.js — file-based fault injection for Express, Fastify, and more

Downloads

52

Readme

Site24x7 Labs Chaos SDK for Node.js

Inject realistic application-level faults into Node.js/Express and Node.js/Fastify microservices. Faults are controlled from the Site24x7 Labs UI, injected via this SDK embedded in the target app, and captured by Site24x7 APM to showcase its monitoring capabilities.

Quick Start

Install

npm install site24x7-chaos-sdk

Initialize (one line)

Express:

import express from 'express';
import { initChaos } from 'site24x7-chaos-sdk/express';

const app = express();
initChaos(app);

Fastify:

import Fastify from 'fastify';
import { chaosPlugin } from 'site24x7-chaos-sdk/fastify';

const app = Fastify();
app.register(chaosPlugin);

Set environment variables

export CHAOS_SDK_ENABLED=true
export CHAOS_SDK_APP_NAME=order-service
export CHAOS_SDK_CONFIG_DIR=/var/site24x7-labs/faults

Mount the shared volume

In Docker Compose, add a shared volume so the agent can write config files and the SDK can read them:

services:
  order-service:
    volumes:
      - chaos_config:/var/site24x7-labs/faults:ro

That's it. No other code changes required.

Supported Fault Types (19)

| # | Fault Type | Category | Description | |---|---|---|---| | 1 | http_exception | Inbound HTTP | Throw a mapped error | | 2 | http_latency | Inbound HTTP | Add artificial latency to requests | | 3 | http_error_response | Inbound HTTP | Return a static error response | | 4 | http_connection_reset | Inbound HTTP | Destroy the socket connection | | 5 | http_slow_body | Inbound HTTP | Stream a response body with inter-chunk delays | | 6 | http_client_latency | Outbound HTTP | Add latency to outbound HTTP calls | | 7 | http_client_exception | Outbound HTTP | Throw an error on outbound calls | | 8 | http_client_error_response | Outbound HTTP | Return a fake error response from outbound calls | | 9 | jdbc_exception | Database | Throw an error before queries | | 10 | jdbc_latency | Database | Add latency before queries | | 11 | jdbc_connection_pool_drain | Database | Hold connections from the pool | | 12 | redis_exception | Redis | Throw an error on Redis commands | | 13 | redis_latency | Redis | Add latency before Redis commands | | 14 | thread_pool_exhaustion | Resource | Spawn blocked async operations | | 15 | memory_pressure | Resource | Allocate large buffers on the heap | | 16 | cpu_burn | Resource | Tight math loops | | 17 | gc_pressure | Resource | Rapid short-lived allocations to stress the GC | | 18 | thread_deadlock | Resource | Deadlocked promises | | 19 | disk_fill | Resource | Write temp files to consume disk space |

Documentation

See docs/integration-guide.md for the full integration guide.

Requirements

  • Node.js >= 18.0.0
  • Express >= 4.0 or Fastify >= 4.0
  • Access to the Site24x7 Labs agent shared volume

License

MIT