# @honojs/sentry

> Sentry Middleware for Hono

Latest version **0.0.6** (published 2023-02-04) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @honojs/sentry
pnpm add @honojs/sentry
yarn add @honojs/sentry
bun add @honojs/sentry
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2023-02-04 |
| First published | 2022-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 986 |
| Author | Samuel Lippert |
| Maintainers | yusukebe, lippertz |

## Links

- npm: https://www.npmjs.com/package/@honojs/sentry
- Repository: https://github.com/honojs/middleware
- npm.io page: https://npm.io/package/@honojs/sentry

## Dependencies (1)

- [toucan-js](https://npm.io/package/toucan-js.md) ^2.6.1

## Recent versions

- 0.0.6 (latest) — 2023-02-04
- 0.0.5 — 2022-12-13
- 0.0.4 — 2022-12-12
- 0.0.3 — 2022-10-09
- 0.0.2 — 2022-09-02
- 0.0.1 — 2022-08-22

## README

# 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](https://github.com/honojs/hono).
This middleware sends captured exceptions to the specified Sentry data source name via [toucan-js](https://github.com/robertcepa/toucan-js).

## Usage

```ts
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

```ts
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

---
_Source: https://npm.io/package/@honojs/sentry · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
