As33
@periodic/
arsenic

Introduction

@periodic/arsenic is a production-grade, framework-agnostic semantic runtime monitoring library for Node.js with TypeScript support. Part of the Periodic series of Node.js packages by Uday Thakur.

It instruments your database layer, correlates queries to HTTP requests, and emits structured events enriched with semantic signals — so you know not just that something is slow, but exactly why.

The naming

Arsenic (As, element 33) is a metalloid known for its dual nature — both toxic and medicinal depending on concentration. Historically it was renowned for its sensitivity in trace detection, used to uncover hidden threats before they became crises. @periodic/arsenic carries the same spirit: surface the hidden signals your backend is already emitting, before they become incidents.

Key capabilities

  • 60+ production signals across Critical (14), Warning (32), and Info (16) severity levels
  • Request correlation — every query linked to its HTTP request via AsyncLocalStorage
  • Callsite attribution — exact file and line for every slow query
  • Multi-database — Prisma, Mongoose, PostgreSQL (pg), and Redis
  • Multi-framework — Express and Fastify
  • Redis command monitoring — 32 commands classified (dangerous, blocking, slow, normal)
  • OpenTelemetry exporter — built-in OTEL support
  • Zero dependencies — pure TypeScript monitoring core
  • No global state — safe for multi-tenant applications
  • Non-blocking — exporters run asynchronously, never delay responses

Explicit non-goals

Arsenic intentionally does not include: built-in dashboards, automatic query rewriting, vendor lock-in, blocking behavior in production, magic on import, file/database transports, metrics collection, or config files. It does one thing well: semantic runtime observability.

Quick navigation