Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ title: Hono on Cloudflare
description: "Learn how to instrument your Hono app on Cloudflare Workers with Sentry."
---

Hono has its own dedicated SDK (`@sentry/hono`) with first-class support for Cloudflare Workers, Node.js, and Bun.
Hono has its own dedicated SDK (`@sentry/hono`) with first-class support for Cloudflare Workers, Node.js, Bun, and Deno.

For setup instructions, see the **[Hono Quick Start Guide](/platforms/javascript/guides/hono/)**.
38 changes: 37 additions & 1 deletion docs/platforms/javascript/guides/hono/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ categories:
- server-node
---

The `@sentry/hono` SDK supports Hono 4+ across multiple runtimes: Cloudflare Workers, Node.js, and Bun. It works as Hono middleware, so you can drop it into your existing app with minimal setup.
The `@sentry/hono` SDK supports Hono 4+ across multiple runtimes: Cloudflare Workers, Node.js, Bun, and Deno. It works as Hono middleware, so you can drop it into your existing app with minimal setup.

<Expandable title="Are you using @hono/sentry?">

Expand Down Expand Up @@ -85,6 +85,10 @@ npm install @sentry/node
npm install @sentry/bun
```

```bash {tabTitle:Deno}
deno add npm:@sentry/deno
```
Comment thread
sentry[bot] marked this conversation as resolved.
Comment thread
s1gr1d marked this conversation as resolved.

</SplitSectionCode>
</SplitSection>
</SplitLayout>
Comment thread
chargome marked this conversation as resolved.
Expand Down Expand Up @@ -319,6 +323,38 @@ app.use(
export default app;
```

```typescript {tabTitle:Deno} {filename:index.ts}
import { Hono } from "hono";
import { sentry } from "@sentry/hono/deno";

const app = new Hono();

app.use(
sentry(app, {
dsn: "___PUBLIC_DSN___",

// To disable sending user data and HTTP bodies, uncomment the line below. For more info visit:
// https://docs.sentry.io/platforms/javascript/guides/hono/configuration/options/#dataCollection
// dataCollection: { userInfo: false, httpBodies: [] },
// ___PRODUCT_OPTION_START___ performance

// Set tracesSampleRate to 1.0 to capture 100%
// of spans for tracing.
tracesSampleRate: 1.0,
// ___PRODUCT_OPTION_END___ performance
// ___PRODUCT_OPTION_START___ logs

// Enable logs to be sent to Sentry
enableLogs: true,
// ___PRODUCT_OPTION_END___ logs
})
);

// Your routes here

Deno.serve(app.fetch);
```

</SplitSectionCode>
</SplitSection>
</SplitLayout>
Expand Down
Loading