UNPKG

nestjs-otel

Version:
15 lines (14 loc) 620 B
import { type NestMiddleware } from "@nestjs/common"; /** * Captures the span active at the start of the request (the HTTP server / * local-root span, before Nest instrumentation nests guard/interceptor/handler * spans) and stashes it on the request so the WideEventInterceptor can flush * accumulated attributes onto the root span rather than a nested child. * * Applied automatically by the OpenTelemetry module for HTTP apps. * * @publicApi */ export declare class WideEventMiddleware implements NestMiddleware { use(req: Record<symbol, unknown>, _res: unknown, next: (error?: unknown) => void): void; }