This plugin automatically instruments the next module.

interface next {
    enabled?: boolean;
    hooks?: {
        request?: ((span?, req?, res?) => any);
    };
    measured?: boolean | {
        [key: string]: boolean;
    };
    service?: any;
}

Hierarchy

  • Instrumentation
    • next

Properties

enabled?: boolean

Whether to enable the plugin.

Default

true
hooks?: {
    request?: ((span?, req?, res?) => any);
}

Hooks to run before spans are finished.

Type declaration

  • Optional request?: ((span?, req?, res?) => any)

    Hook to execute just before the request span finishes.

      • (span?, req?, res?): any
      • Hook to execute just before the request span finishes.

        Parameters

        • Optional span: export=.Span
        • Optional req: IncomingMessage
        • Optional res: ServerResponse<IncomingMessage>

        Returns any

measured?: boolean | {
    [key: string]: boolean;
}

Whether to measure the span. Can also be set to a key-value pair with span names as keys and booleans as values for more granular control.

Type declaration

  • [key: string]: boolean
service?: any

The service name to be used for this plugin.

Generated using TypeDoc