honojs-middleware/packages/sentry
Yusuke Wada de2e95a59e
fix(sentry): fixed sentry options types (#130)
* fix(sentry): fixed sentry options types

* changeset
2023-08-23 10:57:54 +09:00
..
deno_dist fix(sentry): fixed sentry options types (#130) 2023-08-23 10:57:54 +09:00
deno_test Sentry middleware: fix undefined DSN environment variable error (#89) 2023-06-02 06:31:51 +09:00
src fix(sentry): fixed sentry options types (#130) 2023-08-23 10:57:54 +09:00
test fix(sentry): fixed sentry options types (#130) 2023-08-23 10:57:54 +09:00
CHANGELOG.md Version Packages (#88) 2023-06-02 06:37:33 +09:00
README.md setup Sentry middleware 2023-02-04 16:19:47 +09:00
jest.config.js setup Sentry middleware 2023-02-04 16:19:47 +09:00
package.json Version Packages (#88) 2023-06-02 06:37:33 +09:00
tsconfig.json setup Sentry middleware 2023-02-04 16:19:47 +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