-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
docs(deno): Add docs for Hono SDK (Deno) #18373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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?"> | ||
|
|
||
|
|
@@ -85,6 +85,10 @@ npm install @sentry/node | |
| npm install @sentry/bun | ||
| ``` | ||
|
|
||
| ```bash {tabTitle:Deno} | ||
| deno add npm:@sentry/deno | ||
| ``` | ||
|
s1gr1d marked this conversation as resolved.
|
||
|
|
||
| </SplitSectionCode> | ||
| </SplitSection> | ||
| </SplitLayout> | ||
|
Comment on lines
85
to
94
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The Deno installation guide is missing the instruction to install the main Suggested FixAdd a "Deno" tab to the first installation step's code block. This tab should contain the command Prompt for AI Agent |
||
|
|
@@ -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> | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.