MCPcopy Create free account
hub / github.com/getsentry/sentry-javascript / sentry

Function sentry

packages/hono/src/deno/middleware.ts:14–28  ·  view source on GitHub ↗
(app: Hono<E>, options: HonoDenoOptions)

Source from the content-addressed store, hash-verified

12 * Sentry middleware for Hono running in a Deno runtime environment.
13 */
14export const sentry = <E extends Env>(app: Hono<E>, options: HonoDenoOptions): MiddlewareHandler => {
15 options.debug && debug.log('Initialized Sentry Hono middleware (Deno)');
16
17 init(options);
18
19 applyPatches(app);
20
21 return async (context, next) => {
22 requestHandler(context, getConnInfo);
23
24 await next(); // Handler runs in between Request above ⤴ and Response below ⤵
25
26 responseHandler(context, options.shouldHandleError);
27 };
28};

Callers 1

entry.deno.tsFile · 0.90

Calls 6

initFunction · 0.90
applyPatchesFunction · 0.90
requestHandlerFunction · 0.90
responseHandlerFunction · 0.90
nextFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected