Error tracking for Node.js

Your Node.js server
crashed at 3am. Now you'll know why.

FlareLog captures uncaught exceptions, unhandled rejections and failed requests in your Node.js app, with the stack trace and request context. Then it lets Claude or Cursor read them so your AI can fix the bug.

npm install @flarelog/sdk

Free up to 25,000 logs/mo · no card needed

FlareLog · api-serverLive stream
nowERRORUnhandled rejection: connect ECONNREFUSED 10.0.3.12:5432
18sWARNJob email-queue#4821 retrying (attempt 2/5)
40sINFOGET /api/users/42 200 · 31ms
1mERRORTypeError: Cannot read properties of undefined (reading 'total')
2mINFOCleanup job completed: 1,204 rows
4mINFOPOST /api/session 200 · 72ms

The process restarted. The logs went with it. The user just saw a 500.

Whether you run on Render, Railway, Fly.io, a VPS or Docker, stdout scrolls away and restarts wipe the context. FlareLog keeps every error searchable, grouped into issues, and alerts you when a new one appears.

Setup

One SDK for your API,
your workers and your cron jobs.

Create the logger once. Uncaught errors are captured from then on. Add the middleware for request context.

1

Install the SDK

Run npm install @flarelog/sdk. The same package works in Node.js, Next.js, Cloudflare Workers and the browser.

2

Set your API key

Add FLARELOG_API_KEY to your environment. Environment, release and server name are detected automatically.

3

Add the middleware

For Express, add expressMiddleware and expressErrorHandler. Each request gets req.logger with its trace ID. The SDK docs cover Fastify, NestJS and Koa too.

4

Log your background work

Use logger.child() in queue workers and cron jobs, and call logger.flush() on shutdown so nothing is lost.

server.ts
import express from "express";
import { flarelog } from "@flarelog/sdk";
import { expressMiddleware, expressErrorHandler } from "@flarelog/sdk/express";

// Uncaught exceptions and unhandled rejections are captured automatically
const logger = flarelog({ apiKey: process.env.FLARELOG_API_KEY });

const app = express();
app.use(expressMiddleware(logger));

app.get("/api/users/:id", async (req, res) => {
  req.logger.info("Fetching user", { userId: req.params.id });
  res.json(await db.users.findById(req.params.id));
});

app.use(expressErrorHandler(logger));
app.listen(3000);
What you get

Errors with context,
not just a stack trace.

Capture

Crashes caught automatically

Uncaught exceptions, unhandled promise rejections and console.error calls are sent with their stack trace, without wrapping your code in try/catch.

Issues

Grouped, with alerts

Repeated errors are grouped into one issue with counts and first and last seen times. Get an email, Slack, Discord or webhook alert when a new one appears.

Search

Query by any field

Search by message, status:500, user_id:42 or any metadata you log. Keep 7 days free, 30 on Indie and 90 on Pro.

AI debugging

Ask your AI why the API
is throwing in prod.

FlareLog's MCP server gives Claude, Cursor and other AI coding tools read access to your production logs. Your AI sees the real error, the stack trace and the request that caused it, then suggests the fix in your editor.

  • "What's causing the 500s on /api/orders?"
  • "Show unhandled rejections from the last hour"
  • "Which jobs failed overnight, and why?"
  • Paste one JSON config, works in every editor
Connect MCP server
.cursor/mcp.json
{
  "mcpServers": {
    "flarelog": {
      "url": "https://mcp.flarelog.dev",
      "headers": {
        "Authorization": "Bearer fl_your_api_key"
      }
    }
  }
}

Cursor format. Other MCP clients use the same URL and bearer token.

FAQ

Questions Node.js devs
actually ask

Does it work with Fastify, NestJS or Koa?

Yes. Express has ready-made middleware, and the SDK docs show the setup for Fastify, NestJS and Koa. Plain scripts, CLIs and queue workers work with the logger on its own.

Where can my app be hosted?

Anywhere Node.js runs and can make HTTPS requests: Render, Railway, Fly.io, a VPS, Docker or Kubernetes. FlareLog doesn't need access to your host.

I already use OpenTelemetry. Can I send that instead?

Yes. FlareLog accepts OTLP over HTTP (JSON), so you can point an existing OpenTelemetry exporter at it without the SDK.

Will it slow down my requests?

No. Logs are batched and sent in the background. Call logger.flush() on shutdown so the last batch isn't lost.

Can I keep personal data out of my logs?

Yes. Use the SDK's beforeSend hook to remove or mask fields before anything leaves your server.

How does pricing work?

The free plan includes 25,000 logs a month with 7-day retention. Pro is $19 a month for 1M logs and 90-day retention.

Start today

Ship Node.js.
Know when it breaks.

The free plan includes 25,000 logs a month, issue grouping and alerts. No credit card needed.