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
* Sentry middleware for Hono running in a Node runtime environment.
10
+
* Sentry middleware for Hono applications running in a Node.js environment.
11
11
*
12
-
* @param app The root Hono application instance to which the middleware will be applied.
13
-
* @param options Optional Sentry initialization options, which **should usually be omitted** when Sentry is initialized externally (e.g. in an `instrument.ts` file loaded via `--import`).
14
-
* If provided, the middleware will initialize Sentry internally using these options. If omitted, the middleware assumes Sentry has already been initialized externally.
12
+
* This middleware enhances your Hono application by automatically instrumenting incoming requests and outgoing responses.
13
+
* It also applies the necessary patches to ensure Sentry captures execution context correctly in Node.js.
14
+
*
15
+
* **Note:** You must initialize Sentry separately before using this middleware. Typically, this is done by calling `Sentry.init()` in an `instrument.ts` file and loading it via the Node `--import` flag.
'Sentry is not initialized. Call `init()` from @sentry/hono/node in an `instrument.ts` file loaded via `--import` to set up Sentry for your application.',
22
+
);
23
+
}else{
24
+
sentryClient.getOptions().debug&&
25
+
debug.log('Sentry is initialized, proceeding to set up Hono `sentry` middleware.');
0 commit comments