[]previous and next page

InstrumentationModule

The module src/instrumentation.ts exports.

The module src/instrumentation.ts exports.

Import#

ts
import type { InstrumentationModule } from "@shadow-js/dusk/server";

Signature#

ts
interface InstrumentationModule {
  readonly register?: () => void | Promise<void>;
  readonly onRequest?: (
    request: Request,
    context: { readonly requestId: string; readonly routeKind: string },
  ) => void | Promise<void>;
  readonly onRequestError?: (
    error: unknown,
    request: Request | undefined,
    context: RequestErrorContext,
  ) => void | Promise<void>;
  readonly tracer?: TracerLike;
}

Members#

Name Type Description
register? readonly register?: () => void | Promise<void>
onRequest? readonly onRequest?: ( request: Request, context: { readonly requestId: string; readonly routeKind: string }, ) => void | Promise<void>
onRequestError? readonly onRequestError?: ( error: unknown, request: Request | undefined, context: RequestErrorContext, ) => void | Promise<void>
tracer? readonly tracer?: TracerLike