monorepo for Hono third-party middleware/helpers/wrappers
 
 
Go to file
Yusuke Wada 01d488a1d0 chore: rename `@honojs/sentry` to `@hono/sentry` 2023-02-04 16:08:30 +09:00
.github/workflows Initial commit 2022-08-04 08:54:30 +09:00
deno_dist chore: rename `@honojs/sentry` to `@hono/sentry` 2023-02-04 16:08:30 +09:00
deno_test fix(deno): update url to import (#11) 2022-12-13 15:40:22 +09:00
src fix(deno): update url to import (#11) 2022-12-13 15:40:22 +09:00
test chore: bump up Hono; support new error handling (#6) 2022-10-10 00:57:51 +09:00
.eslintrc.js Linting 2022-08-12 09:47:15 -05:00
.gitignore Initial commit 2022-08-04 08:54:30 +09:00
.prettierrc Initial commit 2022-08-04 08:54:30 +09:00
README.md chore: rename `@honojs/sentry` to `@hono/sentry` 2023-02-04 16:08:30 +09:00
jest.config.js Initial commit 2022-08-04 08:54:30 +09:00
package.json chore: rename `@honojs/sentry` to `@hono/sentry` 2023-02-04 16:08:30 +09:00
tsconfig.json Initial commit 2022-08-04 08:54:30 +09:00
yarn.lock fix(deno): update url to import (#11) 2022-12-13 15:40:22 +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