Vercel keeps dashboard logs for 1 hour on Hobby and just 1 day on Pro (full retention breakdown). FlareLog keeps your Next.js, Serverless and Edge logs for up to 90 days and turns errors into issues you can fix. On Vercel Pro or Enterprise, connect a log drain with no code change. On any plan, add the SDK.
Free up to 25,000 logs/mo · no card needed
Logs expired
Hobby keeps about 1 hour of runtime logs
You shipped on Vercel. But at 2am your function errors and the logs are already gone.
Vercel's built-in logging is fine for quick checks. It's not built for incident response, cost debugging, or asking your AI why a production checkout failed. FlareLog is.
Connect Vercel from your FlareLog project's settings and Vercel sends your function, edge and build logs straight to FlareLog. No SDK, no redeploy. Thrown errors and crashed requests become issues with the stack and a fix prompt for your AI.
Vercel only offers drains on Pro and Enterprise, so on Hobby the SDK ships your logs as they happen. It also adds what a drain can't: structured fields you choose on each log, and AI call tracking with the cost of each call.
Install the SDK
Run npm install @flarelog/sdk. One package covers Next.js, Vercel Serverless, Edge, and Middleware.
Set your API key
Add FLARELOG_API_KEY as a Vercel environment variable. The SDK auto-detects Vercel's runtime env vars.
Wrap your handler
Use withNextRouteHandler for Next.js Route Handlers, or withVercelServerless / withVercelEdge for raw Vercel routes.
Connect MCP (optional)
Paste the MCP config into Cursor, Claude Desktop, or Lovable and ask your AI "why did /api/checkout fail?" using live production logs.
import { flarelog } from "@flarelog/sdk";
import { withNextRouteHandler } from "@flarelog/sdk/next";
const logger = flarelog({ apiKey: process.env.FLARELOG_API_KEY });
export const POST = withNextRouteHandler(logger, async (request) => {
const body = await request.json();
logger.info("Checkout started", { cartId: body.cartId });
const payment = await stripeCheckout(body);
logger.info("Payment complete", { paymentId: payment.id });
return Response.json({ ok: true });
});import { flarelog } from "@flarelog/sdk";
import { withVercelServerless } from "@flarelog/sdk/vercel";
const logger = flarelog({ apiKey: process.env.FLARELOG_API_KEY });
export default withVercelServerless(logger, async (req, res) => {
req.logger.info("API request", { path: req.url });
const result = await fetch("https://api.example.com/data");
req.logger.debug("Upstream response", { status: result.status });
res.json({ data: await result.json() });
});import { flarelog } from "@flarelog/sdk";
import { withVercelEdge } from "@flarelog/sdk/vercel";
export const config = { runtime: "edge" };
const logger = flarelog({ apiKey: process.env.FLARELOG_API_KEY });
export default withVercelEdge(logger, async (request) => {
logger.info("Edge request", { url: request.url });
const response = await fetch(request);
logger.info("Edge response", { status: response.status });
return response;
});# Add to your Vercel project
vercel env add FLARELOG_API_KEY
# or paste in the dashboard
FLARELOG_API_KEY=fl_your_api_keyStop losing context after one hour. FlareLog gives you 7 days free and 90 days on Pro so you can debug last week's incident without replaying traffic.
Filter by stripeEvent, Prisma query, App Router path, or any nested field. Vercel's text-only search can't do that.
Background work like webhooks and waitUntil often vanish when a serverless function freezes. FlareLog flushes them before the invocation ends.
Vercel meters observability events alongside requests. One bot swarm or Product Hunt launch can inflate both. FlareLog buckets your logs for a flat $19/mo up to 1M logs.
A scraper hitting every route can generate millions of log events. FlareLog's Pro bucket absorbs that instead of multiplying your bill.
Product Hunt traffic is a good problem until your logging bill grows with it. A flat rate keeps launch day predictable.
You can't stop every attack, but you can stop one from turning into a five-figure observability invoice. Your costs stay bounded.
FlareLog's MCP server connects Cursor, Claude Desktop, or Lovable Agent to your real Vercel logs. No browser tab, no manual grep, no copy-pasting stack traces.
{
"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.
No, it sits alongside them. Vercel gives you traffic and Web Vitals. FlareLog gives you searchable structured logs, error grouping, cost burn alerts, and AI-native debugging.
The SDK adds sub-millisecond overhead. Logs are batched and flushed asynchronously, so request latency stays untouched.
Yes. Use withVercelEdge for Edge Functions and Middleware. It runs natively on the Edge runtime with zero dependencies.
Export onRequestError from instrumentation.ts using createOnRequestError to capture every server error, including Server Actions. Wrap Route Handlers with withNextRouteHandler. See FlareLog for Next.js.
Not on Vercel Pro or Enterprise. Connect a Vercel log drain from your FlareLog project's settings and your function, edge and build logs arrive with no code change. Add the SDK as well if you want your own structured fields or AI call and cost tracking.
No. On Hobby, use the SDK: it ships logs with one environment variable. On Pro and Enterprise you can also use a log drain, which needs no code.
Yes. Start with 25,000 logs/mo and 7-day retention on the free tier. Upgrade to Pro when you need 1M logs/mo, 90-day retention, Slack alerts, and the cost burn dashboard.
Free tier includes 25,000 logs/month and all core features. No credit card. Connect a Vercel log drain with no code, or add the SDK on any plan.