You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Initialize the Sentry Hono middleware as early as possible in your app:
49
49
50
50
```typescript
51
+
import { Hono } from'hono';
51
52
import { sentry } from'@sentry/hono/cloudflare';
52
53
53
54
const app =newHono();
@@ -64,3 +65,20 @@ app.use(
64
65
65
66
exportdefaultapp;
66
67
```
68
+
69
+
#### Access `env` from Cloudflare Worker bindings
70
+
71
+
Pass the options as a callback instead of a plain options object. The function receives the Cloudflare Worker `env` as defined in the Worker's `Bindings`:
// Always filter out the Hono integration from defaults and user integrations.
32
-
// The Hono integration is already set up by withSentry, so adding it again would cause capturing too early (in Cloudflare SDK) and non-parametrized URLs.
// Always filter out the Hono integration from defaults and user integrations.
37
+
// The Hono integration is already set up by withSentry, so adding it again would cause capturing too early (in Cloudflare SDK) and non-parametrized URLs.
0 commit comments