honojs-middleware/packages/sentry/deno_dist
Yusuke Wada 34ad29dca5 setup Sentry middleware 2023-02-04 16:19:47 +09:00
..
README.md Add 'packages/sentry/' from commit '6cb773ae9b303ce4def1b801cac9fa91be5ea747' 2023-02-04 16:12:03 +09:00
index.ts setup Sentry middleware 2023-02-04 16:19:47 +09:00
mod.ts Add 'packages/sentry/' from commit '6cb773ae9b303ce4def1b801cac9fa91be5ea747' 2023-02-04 16:12:03 +09:00

README.md

Sentry middleware for Hono

Information

Sentry Middleware @honojs/sentry is renamed to @hono/sentry. @honojs/sentry is not maintained, please use @hono/sentry. Also, for Deno, you can use import with npm: prefix like npm:@hono/sentry.


Sentry middleware for Hono. This middleware sends captured exceptions to the specified Sentry data source name via toucan-js.

Usage

import { sentry } from '@hono/sentry'
import { Hono } from 'hono'

const app = new Hono()

app.use('*', sentry())
app.get('/', (c) => c.text('foo'))

export default app

Deno

import { serve } from 'https://deno.land/std/http/server.ts'
import { sentry } from 'npm:@hono/sentry'
import { Hono } from 'https://deno.land/x/hono/mod.ts'

const app = new Hono()

app.use('*', sentry({ dsn: 'https://xxxxxx@xxx.ingest.sentry.io/xxxxxx' }))
app.get('/', (c) => c.text('foo'))

serve(app.fetch)

Author

Samuel Lippert https://github.com/sam-lippert

License

MIT