Quickstart
- Next.js
- Node.js
- Vercel Log Drain
- Railway Log Drain
Initialize
Create
instrumentation.ts in your project root:instrumentation.ts
Using Next.js 14?
Using Next.js 14?
Enable the instrumentation hook in This is automatic in Next.js 15+.
next.config.js:next.config.js
Using the src/ directory?
Using the src/ directory?
Place the file at
src/instrumentation.ts instead.Add environment variables
Find your API key and project ID in Dashboard > Settings > API Keys.
.env.local
Verify
Trigger a test error, then check your dashboard. The error should appear within seconds with an AI triage summary.
Full Next.js SDK docs
Middleware, API routes, error boundaries, breadcrumbs, and more.
Troubleshooting
Errors not appearing
Errors not appearing
- Check your API key starts with
sq_pk_and matches the project - Add
debug: truetoinit()and check console for[squasher]messages - Check the Network tab for POST requests to
ingest.squasher.ai—202means accepted,401means bad key,429means you hit your event limit - For log drains, wait at least a minute (Vercel batches deliveries)
Minified stack traces
Minified stack traces
Upload source maps so Squasher can resolve original file names and line numbers. See Source Maps.
More help
More help
See the full Troubleshooting page.