honojs-middleware/packages/sentry/deno_dist
Yusuke Wada c2093e17e0
feat(sentry): bump up `toucan-js` to v3 (#137)
* feat(sentry): bump up `toucan-js` to v3

* update readme

* add changeset

* update readme
2023-08-24 11:21:16 +09:00
..
README.md feat(sentry): support latest Hono version (#57) 2023-03-02 15:14:11 +09:00
index.ts feat(sentry): bump up `toucan-js` to v3 (#137) 2023-08-24 11:21:16 +09:00
mod.ts Add 'packages/sentry/' from commit '6cb773ae9b303ce4def1b801cac9fa91be5ea747' 2023-02-04 16:12:03 +09:00

README.md

Sentry middleware for Hono

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

Usage

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

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