Production-grade observability for LLM applications in Node.js.
"Datadog for LLMs β built for Node.js"
NodeLLM Monitor provides infrastructure-first monitoring for AI applications. It captures requests, tool calls, costs, performance metrics, and traces across providers and SDKs β with a standalone real-time dashboard.
Modern AI apps fail silently. You need visibility into:
- Request latency β How long are LLM calls taking?
- Token usage & cost β What's the actual spend per request?
- Tool execution β Which tools are being called, and are they succeeding?
- Streaming behavior β What's the time-to-first-token?
- Error rates β Which requests are failing and why?
- Provider reliability β Is OpenAI slower than Anthropic today?
NodeLLM Monitor gives you deep observability without vendor lock-in.
- Teams running LLMs in production β You need visibility, not just logs
- Node.js backend engineers building AI features β First-class TypeScript support
- Platforms needing provider-agnostic telemetry β Works with any LLM provider
- Apps using NodeLLM, Vercel AI SDK, LangChain, or OpenTelemetry pipelines
NodeLLM Monitor is designed as a decoupled observability layer:
LLM SDK / Framework
β
NodeLLM Middleware OR OpenTelemetry Bridge
β
Monitoring Engine
β
Storage Adapter (Memory / File / Prisma / Custom)
β
Dashboard + API
It operates in two primary modes:
- Native Middleware: First-class integration with
@node-llm/core - OpenTelemetry Bridge: Zero-code instrumentation for Vercel AI SDK, LangChain, or any OTel-compatible library
| Package | Version | Description |
|---|---|---|
@node-llm/monitor |
Core monitoring engine, storage adapters, and dashboard | |
@node-llm/monitor-otel |
OpenTelemetry bridge for AI observability |
pnpm add @node-llm/monitorIf you are using @node-llm/core, adding monitoring is a single line:
import { createLLM } from "@node-llm/core";
import { Monitor } from "@node-llm/monitor";
const monitor = Monitor.memory(); // Or File/Prisma adapter
const llm = createLLM({
provider: "openai",
model: "gpt-4o",
middlewares: [monitor]
});
// All calls via 'llm.ask()' are now automatically tracked!Zero-code instrumentation for existing OTel-instrumented libraries:
import { NodeTracerProvider } from "@opentelemetry/sdk-trace-node";
import { NodeLLMSpanProcessor } from "@node-llm/monitor-otel";
import { Monitor } from "@node-llm/monitor";
const monitor = Monitor.memory();
const provider = new NodeTracerProvider();
// Hook the AI-aware SpanProcessor into your OTel pipeline
provider.addSpanProcessor(new NodeLLMSpanProcessor(monitor.getStore()));
provider.register();import express from "express";
import { Monitor } from "@node-llm/monitor";
const monitor = Monitor.memory();
const app = express();
// Standalone dashboard available at /monitor
app.use(monitor.api({ basePath: "/monitor" }));
app.listen(3000);Track the pulse of your AI infrastructure:
- Throughput: Request volume and error rates.
- Cost: Automatic token counting and USD cost calculation for major providers.
- Performance: Latency tracking, Time-to-First-Token (TTFT), and tokens/sec.
Inspect the full lifecycle of every AI request:
- Tool Calls: See exactly what tools were called, their arguments, and results.
- Streaming: Visualize the progression of streamed responses.
- Content: Optional request/response content capture for debugging.
Production-safe by default:
- Zero-Storage Content: Content capture is disabled by default.
- Automated Scrubbing: Built-in identifiers for PII (emails, keys, etc.) that mask sensitive data before it hits your database.
| Adapter | Use Case |
|---|---|
| Memory | Development and high-speed transient monitoring |
| Filesystem | Persistent JSON logs for low-overhead auditing |
| Prisma | Production-grade storage (PostgreSQL, SQLite, MySQL) |
| Custom | Build your own (Redis, OpenSearch, etc.) |
NodeLLM Monitor works seamlessly with:
- NodeLLM Core β Native middleware integration
- Vercel AI SDK β Via OpenTelemetry bridge
- LangChain β Via OpenTelemetry bridge
- Any OpenTelemetry instrumented system
This is a pnpm workspace. To get started:
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run the test suite
pnpm testNote: If you encounter
tsx: command not foundwhen running examples, ensure you've runpnpm installat the root to link workspace binaries.
We provide detailed examples for various scenarios:
| Example | Description |
|---|---|
demo |
Full demo with simulated real-world AI traffic |
otel-vercel-ai-sdk |
Integration with Vercel AI SDK via OpenTelemetry |
vercel-ai-sdk |
Manual instrumentation for Vercel AI SDK |
custom-adapter |
How to implement your own MonitoringStore |
Contributions welcome! Please read:
Please report vulnerabilities responsibly via SECURITY.md.
MIT Β© Shaiju Edakulangara
Built with β€οΈ for the Node.js AI community