Fastify Plugin

Fastify monitoring as fast as your framework

One Fastify plugin for error tracking and request monitoring — registered in a single app.register call, unified with logs, uptime, and infrastructure on the same platform. Your routes stay fast; your failures stop being invisible.

Why Fastify services need real error tracking

Teams pick Fastify for throughput, then discover that speed makes failures harder to see, not easier. A handler throws on one request in ten thousand, an upstream dependency adds 300ms to a hot route, and the only evidence is a 500 in an access log on one of several instances. By the time someone notices, the request that triggered it — its path, status, and duration — is long gone, and reproducing the error locally is guesswork.

AllStak's Fastify plugin closes that gap with one app.register call. It hooks into Fastify's own onRequest, onResponse, and onError lifecycle, so every error is captured automatically with the request that caused it, and every inbound request is recorded with method, path, status, and duration. Handled errors report through an exported captureException. Everything lands on one dashboard next to your logs, uptime checks, and host metrics — one platform, one bill, instead of a tool per signal.

Full-stack Fastify monitoring

From the first unhandled error to the host it ran on, AllStak covers your Fastify services across every layer.

Error tracking

Errors are captured automatically through the plugin's onError hook, with full stack traces and request context — grouped so a thousand occurrences of the same bug read as one issue.

Request monitoring

The plugin uses Fastify's onRequest/onResponse/onError hooks to record method, path, status, and duration for every inbound request — automatic, with no manual hook to write.

Trace propagation

Server spans are captured per request and the plugin injects traceparent and baggage response headers, so a request keeps its identity as it crosses your services.

Log management

Centralize logs from every service next to the errors they relate to, searchable from the same dashboard instead of scattered files across instances.

Infrastructure monitoring

A lightweight host agent reports CPU, memory, disk, network, and Docker — so you can tell a handler bug from a Node.js process starved of resources.

Alerts & incidents

Get notified on new errors, spikes, and threshold breaches via Slack, email, webhooks, PagerDuty, Opsgenie, or Telegram — with incidents that keep on-call organized.

Add AllStak in minutes

Install from npm and register the plugin before your routes — error and request capture starts immediately.

server.ts
npm install @allstak/fastify fastify

import Fastify from 'fastify';
import allstakFastify from '@allstak/fastify';

const app = Fastify();

await app.register(allstakFastify, {
  apiKey: process.env.ALLSTAK_API_KEY,
  environment: process.env.NODE_ENV ?? 'production',
  release: process.env.ALLSTAK_RELEASE,
  serviceName: 'checkout-api',
  captureRequestHeaders: true,
});

Register the plugin before defining routes — errors are captured automatically via onError, and handled ones report through the exported captureException. full setup guide · SDK reference.

What you see in AllStak

Error detail with full context

Open any issue to a full stack trace, the request that triggered it, the environment and release it came from, and how often it fired — everything triage needs on one screen.

Requests & performance

Per-route latency and error rates from Fastify's own lifecycle hooks show exactly which endpoint degraded and when — no access-log spelunking required.

Unified real-time dashboard

Errors, requests, logs, and host health for all your Fastify services update live on one dashboard — in English or Arabic — so the whole team shares the same picture.

Why teams pick AllStak for Fastify

  • One platform for errors, requests, logs, uptime, and infrastructure — one bill, no tool sprawl.
  • One app.register call wires error and request capture into Fastify's native hooks — no manual instrumentation.
  • Server spans plus injected traceparent and baggage headers keep requests traceable across services.
  • serviceName and release separate your data, so a regression points at the deploy that caused it.
  • Predictable SAR pricing with a genuine free tier — start without a credit card.
  • Data stays in Saudi Arabia, with an English and Arabic dashboard for the whole team.

Fastify monitoring FAQ

How do I add error tracking to a Fastify app?

Install @allstak/fastify from npm and register the plugin with your API key before defining routes. Errors are captured automatically through the plugin's onError hook, and handled exceptions report via the exported captureException — the setup guide walks through the full configuration.

Does the plugin capture requests automatically?

Yes. The plugin uses Fastify's onRequest, onResponse, and onError hooks to capture method, path, status, duration, and server spans for every inbound request, and it injects traceparent and baggage propagation headers into responses — no manual hook needed. captureRequestHeaders adds request-header context when you want it.

Is AllStak free for Fastify?

Yes. AllStak has a free tier you can start on without a credit card, and predictable SAR pricing as you grow. The Fastify plugin itself is free to use.

Is AllStak a Sentry alternative for Fastify?

Yes. You get Fastify error tracking with grouping and releases — plus automatic request monitoring, logs, uptime, and infrastructure monitoring that Sentry would require extra tools for, consolidated on one platform with SAR pricing and data stored in Saudi Arabia.

Will the plugin slow down my Fastify app?

The plugin is built for production and rides Fastify's own lifecycle hooks instead of wrapping your handlers, so capture happens alongside work the framework already does. You keep the throughput you chose Fastify for, with visibility you didn't have.

Start monitoring Fastify today

npm install, register one plugin, and watch errors and requests flow into one dashboard. Start free — no credit card required.