✦ For Hono · Cloudflare Workers · Bun · Deno · Node · Vercel ✦

01Observability for Hono

Hono runs anywhere.
Your logs should too.

Hono's built-in logger() middleware is great for dev. It prints to console and disappears. FlareLog is the production layer — structured logs, error capture, and AI debugging that work identically across Cloudflare Workers, Bun, Deno, Node, and Vercel.

$npm install @flarelog/sdk
Hono Logger Middleware
FlareLog
stdout — gone on restart

POST /api/orders -- 200

GET /api/users -- 200

Error: [object Object]

↑ no trace, no body, no retention

Dev Only

Not a production story

Live stream90-day retention
nowERRORDatabase timeout after 5000ms
12sWARNSlow upstream: 320ms
45sINFO200 — 78ms
1mERRORTypeError: Cannot read 'hits' of undefined
3mWARNRequest body > 10MB
5mINFO200 — 4ms

5

Runtimes supported

1

Line to install

90d

Pro retention

$19

flat Pro bucket

Hono is multi-runtime. Your observability stack isn't. That breaks production.

You deployed the same Hono app to Cloudflare Workers, then to Bun, then to a Vercel preview. Three runtimes, three different log formats, three retention limits. Errors fall through the cracks between environments. FlareLog gives you one structured view across every Hono target.

02One middleware, every runtime

Wrap your Hono app.
Ship to any runtime.

The @flarelog/sdk/hono package is runtime-agnostic. It uses Web standard fetch() to ship logs — no Node-only APIs, no runtime adapters, no polyfills.

1

Install the SDK

Run npm install @flarelog/sdk. One package covers Hono middleware plus any other FlareLog framework wrappers you need (Next.js, TanStack Start, React, Express).

2

Add the middleware

Import honoMiddleware from @flarelog/sdk/hono and register it with app.use("*", honoMiddleware(logger)).

3

Use c.get('logger') anywhere

Every request automatically gets a child logger with traceId, method, and path. Add breadcrumbs, structured metadata, or log errors with full context.

4

Deploy to your runtime of choice

Same code works on Cloudflare Workers, Bun, Deno Deploy, Node, or Vercel. Set FLARELOG_API_KEY as an env var and deploy.

src/index.ts
import { Hono } from "hono";
import { flarelog } from "@flarelog/sdk";
import { honoMiddleware } from "@flarelog/sdk/hono";

const app = new Hono();

const logger = flarelog({ apiKey: env.FLARELOG_API_KEY });

// One line. Every request gets structured logs.
app.use("*", honoMiddleware(logger));

app.get("/api/orders/:id", async (c) => {
  const logger = c.get("logger");
  const id = c.req.param("id");

  try {
    const order = await fetchOrder(id);
    logger.info("Order fetched", { orderId: id });
    return c.json(order);
  } catch (err) {
    // Auto-captured by middleware, but you can add context:
    logger.logError(err, { message: "Order lookup failed" });
    return c.json({ error: "Order not found" }, 404);
  }
});

export default app;
runtime-agnostic.ts
// Hono runs anywhere. FlareLog follows.
// ── Cloudflare Workers (wrangler.jsonc) ──────────────────────
// { "vars": { "FLARELOG_API_KEY": "fl_..." } }

// ── Bun (bun run dev) ────────────────────────────────────────
// export const logger = flarelog({ apiKey: Bun.env.FLARELOG_API_KEY });

// ── Node / Vercel / Deno ─────────────────────────────────────
// export const logger = flarelog({ apiKey: process.env.FLARELOG_API_KEY });

// Same `honoMiddleware(logger)` works in every runtime.
// No runtime-specific adapter, no node_modules bloat.
.env / wrangler.jsonc / vercel env
# Cloudflare Workers (wrangler.jsonc vars)
# Vercel: vercel env add FLARELOG_API_KEY
# Bun:    export FLARELOG_API_KEY=fl_...
# Deno:   --env flag or .env file
FLARELOG_API_KEY=fl_your_api_key
03Core pillars

Built for multi-runtime
Hono production apps

Multi-runtime

Same SDK, every target

Cloudflare Workers, Bun, Deno Deploy, Node, Vercel Edge. The SDK uses Web standard fetch() — no Node-only APIs, no runtime adapters. Your logs look identical across environments.

Search

Structured JSON, not stdout

Query by c.req.path, status code, traceId, or any custom metadata. Filter errors across all your Hono services in one dashboard.

Async

No dropped background logs

Logs inside c.executionCtx.waitUntil on Workers or async Hono handlers are batched and flushed before the invocation ends. Nothing is lost when the isolate freezes.

Retention

Days of searchable history

Stop losing every log on the next deploy or isolate restart. 7 days on the free tier, 90 days on Pro. That bug from last Tuesday's release? Still searchable.

Errors

Automatic error capture

Any uncaught exception in a route handler is captured with stack trace, request context, and breadcrumbs — even if your try/catch missed it.

MCP

AI debugging in Cursor / Claude

Connect FlareLog's MCP server to Cursor, Claude Desktop, or Lovable Agent. Ask "why did /api/orders 500 in the last hour?" and get structured answers.

04Hono Logger vs FlareLog

Built-in middleware is for dev.
FlareLog is for production.

Hono ships a Logger Middleware in the core package. It's perfect for seeing requests scroll by in your terminal. But the moment you deploy, you need search, retention, and error capture — and that's where FlareLog picks up.

Capability
FlareLog logoFlareLog
Hono Logger Middleware
Log retention
7 days free, 90 days on Pro, searchable
Console output — gone when the process restarts
Structured JSON search
Filter by path, status, traceId, userId, any metadata
Plain text grep over stdout
Works across all Hono runtimes
Same SDK on CF Workers, Bun, Deno, Node, Vercel
Logger output depends on host runtime
Async log flushing (waitUntil)
Reliably flushed before invocation ends
Logs dropped when the isolate freezes
AI-native debugging
MCP server for Cursor / Claude / Lovable Agent
Browser-only workflow
Bundle size
Tree-shakable — import only honoMiddleware, pay far less than 11KB ceiling
Hono Logger is ~1KB

Use case

Multi-runtime deploys

Same Hono codebase shipped to Workers + Bun + Vercel. FlareLog unifies logs across every runtime into one queryable dashboard.

Use case

API gateway in Hono

A Hono API gateway proxying dozens of upstreams. FlareLog captures every upstream latency, status, and error with trace correlation.

Use case

AI agents on Hono

Hono powering an LLM agent or MCP server. FlareLog's MCP server lets Cursor/Claude read your prod logs and propose fixes.

05AI-Native debugging

Ask Cursor why a route
is 500ing in prod.

FlareLog's MCP server connects Cursor, Claude Desktop, or Lovable Agent to your real Hono production logs. Skip the dashboard and let your AI read structured errors with full request context.

  • "Show every error on POST /api/orders in the last hour"
  • "What's the p95 latency for /api/search?"
  • "List 500s grouped by route for today"
  • Paste one JSON config, works in every editor
Connect MCP server
cursor settings.json
{
  "mcpServers": {
    "flarelog": {
      "url": "https://mcp.flarelog.dev",
      "headers": {
        "Authorization": "Bearer fl_your_api_key"
      }
    }
  }
}

↑ Paste into Cursor, Claude Desktop, or Lovable Connectors.

06FAQ

Questions Hono devs
actually ask

Does it work with Hono on Cloudflare Workers?

Yes. The SDK uses Web standard APIs (fetch, crypto.randomUUID) and works out of the box on the Workers runtime. Logs are flushed via ctx.waitUntil so nothing is dropped when the isolate freezes.

Does it work with Hono on Bun / Deno / Node?

Yes. The same honoMiddleware(logger) works on every runtime Hono supports. The SDK reads the API key from process.env (Node, Bun, Deno with --env), Bun.env, or env binding on Workers. No adapters.

Why not just use Hono's built-in Logger Middleware?

Hono's logger() middleware prints to console — perfect for local dev. But in production you need: structured fields (not text), multi-day retention, search, error capture, and alerting. FlareLog is the production layer on top of Hono's dev story. You can run both — many teams do.

Will it slow down my Hono routes?

No. Logs are batched and sent asynchronously via waitUntil or setTimeout depending on runtime. Per-request overhead is sub-millisecond and never blocks the response. Hono's reputation for speed stays intact.

What's the bundle size impact? I picked Hono because it's tiny.

Same concern, which is why the SDK is fully tree-shakable. The 11KB ceiling is what you'd ship if you imported every framework wrapper (Hono + Express + TanStack Start + React + Next.js + Cloudflare Workers). If you only import @flarelog/sdk/hono, everything else gets stripped at build time. Import just flarelog + honoMiddleware and your actual addition is far under the ceiling.

Can I capture errors automatically?

Yes. The middleware wraps next() in a try/catch. Any uncaught exception in a route handler is logged with stack trace, request method, path, traceId, and any breadcrumbs you added via c.get("logger").addBreadcrumb() before the error.

How does pricing work?

Free tier: 10,000 logs/month, 7-day retention. Pro: $19/month for 1M logs/month and 90-day retention. No surprises during traffic spikes — flat bucket pricing, not per-event metering.

07Start today

Build on Hono.
Ship with confidence.

Free tier includes 10,000 logs/month, structured search, automatic error capture, and MCP debugging. Works across every Hono runtime. No credit card.