diff --git a/docs/platforms/javascript/guides/cloudflare/frameworks/hono.mdx b/docs/platforms/javascript/guides/cloudflare/frameworks/hono.mdx index 819c08c3b07bc..75545c313dfa2 100644 --- a/docs/platforms/javascript/guides/cloudflare/frameworks/hono.mdx +++ b/docs/platforms/javascript/guides/cloudflare/frameworks/hono.mdx @@ -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/)**. diff --git a/docs/platforms/javascript/guides/hono/index.mdx b/docs/platforms/javascript/guides/hono/index.mdx index a1ea9e4166010..67bb4a032d8b3 100644 --- a/docs/platforms/javascript/guides/hono/index.mdx +++ b/docs/platforms/javascript/guides/hono/index.mdx @@ -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. @@ -85,6 +85,10 @@ npm install @sentry/node npm install @sentry/bun ``` +```bash {tabTitle:Deno} +deno add npm:@sentry/deno +``` + @@ -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); +``` +