Node
npm install @fictura/node, two lines, and the console.error calls you already write become issues.
For Express, Fastify, or any Node service. Zero dependencies, Node 18+.
npm install @fictura/nodeWire it
import { Fictura } from "@fictura/node";
const fictura = new Fictura({
apiBase: process.env.FICTURA_API_BASE!,
apiKey: process.env.FICTURA_API_KEY!, // Dashboard → Setup → SDK app key
release: process.env.GIT_SHA,
environment: process.env.NODE_ENV,
});
fictura.install();What gets captured
Crashes and failed awaits — uncaughtException and unhandledRejection. Your process still dies on an uncaught error with the same exit code; adding a listener normally suppresses that, so we put it back. And every console.error(...) you already write:
try {
await stripe.charges.create(payload);
} catch (e) {
console.error("charge failed", e); // ← already reported
return retryLater();
}Anything explicit: fictura.captureException(e, { route: "/api/v1/generate", userId: user.id }). An error that is both logged and thrown is reported once.
Express
app.use(fictura.errorHandler()); // after your routesFailed requests then carry their route template and user id, so /users/1 and /users/2 stay one issue instead of one per user. The error passes through to your own handler untouched.
Options & guarantees
| Option | Default | |
|---|---|---|
captureConsole | true | Report console.error. false for crashes only. |
environment | "production" | Keeps staging noise out of production's list. |
release | — | Which deploy an error came from. |
Never throws into your app, never blocks a response: bounded queue that drops oldest-first, 2s HTTP timeout, no retry storms. The flush timer is unref'd, so a finished script still exits when it should.