✦ For Next.js · App Router · Pages Router · Server Actions ✦
Vercel gives you about one hour of logs. FlareLog captures API routes, Server Actions, Route Handlers, and client errors — then lets you search them by path, component, or error for days.
Application error: a server-side exception has occurred
Digest: 2948302219...
Logs Expired
Upgrade Vercel to see older logs
90d
Pro retention
3
lines to install
10k
free logs/mo
$19
flat Pro bucket
Your Next.js app is production-grade. But your logs aren't. By morning the trace is gone.
App Router server errors show a digest, Server Actions fail silently, and route handler logs vanish in an hour. FlareLog gives your Next.js stack the observability it deserves.
Wrap your API route or add the React error boundary. That's it. No OpenTelemetry files, no heavy dependencies, no runtime friction.
Install the SDK
Run npm install @flarelog/sdk. One package covers your Next.js backend, API routes, and React client-side errors.
Set your API key
Add FLARELOG_API_KEY to your Vercel environment variables or .env.local. The SDK detects Vercel automatically.
Wrap your backend
Use withFlareLog around your API route handler. Then use req.logger anywhere to add context.
Wrap your client (optional)
Add FlareLogErrorBoundary around your App component to capture React render errors in the browser.
import { flarelog } from "@flarelog/sdk";
import { withFlareLog } from "@flarelog/sdk/next";
const logger = flarelog({ apiKey: process.env.FLARELOG_API_KEY });
export default withFlareLog(logger, async (req, res) => {
req.logger.info("Checkout started", {
path: req.url,
method: req.method,
});
try {
const order = await createOrder(req.body);
req.logger.info("Order created", { orderId: order.id });
res.status(200).json({ order });
} catch (err) {
req.logger.error("Checkout failed", { error: err });
res.status(500).json({ error: "Checkout failed" });
}
});import { flarelog } from "@flarelog/sdk";
import { FlareLogErrorBoundary, useFlareLog } from "@flarelog/sdk/react";
const logger = flarelog({
apiKey: process.env.NEXT_PUBLIC_FLARELOG_API_KEY,
});
export default function App({ Component, pageProps }) {
return (
<FlareLogErrorBoundary logger={logger}>
<Component {...pageProps} />
</FlareLogErrorBoundary>
);
}# Add to your Vercel project
vercel env add FLARELOG_API_KEY
# or paste in the dashboard
FLARELOG_API_KEY=fl_your_api_keyStop losing incident context after one hour. FlareLog keeps 7 days on the free tier and 90 days on Pro, so last week's failing Server Action is still searchable.
Search structured JSON logs by nextUrl.pathname, component, or any custom metadata. Ditch Vercel's text-only grep.
Background work inside Server Actions, Route Handlers, or waitUntil is reliably flushed before the invocation ends — instead of vanishing when the function freezes.
Vercel's event-based observability metering scales with every request. FlareLog gives you a flat Pro bucket up to 2M logs for $19/mo — so bot traffic doesn't become a surprise invoice.
Why it matters
Scrapers hitting dynamic routes can generate millions of log events. FlareLog's Pro bucket absorbs the noise without multiplying your bill.
Why it matters
Product Hunt traffic is a good problem — unless your logging cost scales linearly. Flat-rate monitoring keeps launches stress-free.
Why it matters
Debugging a failing Server Action from a digest string is painful. Searchable retained logs let you trace the exact call and payload.
FlareLog's MCP server connects Cursor, Claude Desktop, or Lovable Agent to your real Next.js logs. Skip the dashboard and let your AI read structured production errors in context.
{
"mcpServers": {
"flarelog": {
"url": "https://mcp.flarelog.dev",
"headers": {
"Authorization": "Bearer fl_your_api_key"
}
}
}
}↑ Paste into Cursor, Claude Desktop, or Lovable Connectors.
Yes. Wrap your Route Handlers or API routes with withFlareLog and attach FlareLogErrorBoundary for client errors. Structured logs carry route and component context automatically.
No. Logs are batched and sent asynchronously out-of-band. Per-request overhead is sub-millisecond, so your TTFB and action latency stay untouched.
Yes. Server Action failures are captured as structured errors with the action name, payload metadata you choose to log, and stack trace — and retained for 7–90 days depending on your tier.
Use FlareLogErrorBoundary and useFlareLog from @flarelog/sdk/react to send React render and caught errors to the same dashboard.
No. FlareLog is independent of your Vercel tier. You can stay on Vercel Hobby and still get days of log retention and structured search.
Free tier includes 10,000 logs/mo and 7-day retention. Pro is $19/mo for 2M logs/mo and 90-day retention. No surprises during traffic spikes.
Free tier includes 10,000 logs/month, structured search, and client error capture. No credit card, no marketplace integration — just install the SDK.