dd-trace
    Preparing search index...

    Interface next

    This plugin automatically instruments the next module.

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

    Properties

    enabled?: boolean

    Whether to enable the plugin.

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

    Hooks to run before spans are finished.

    Type Declaration

    • Optionalrequest?: (
          span?: Span,
          req?: IncomingMessage,
          res?: ServerResponse<IncomingMessage>,
      ) => any

      Hook to execute just before the request span finishes.

    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.

    service?: any

    The service name to be used for this plugin.