traceperf
    Preparing search index...

    Function withTracing

    • Wrap any request handler, e.g. a Next.js route handler:

      export const GET = withTracing(tp, async (request) => { ... });

      When the first argument looks like a Request, the label defaults to "METHOD /path"; otherwise the function name.

      Type Parameters

      • T extends (...args: any[]) => any

      Parameters

      Returns (...args: Parameters<T>) => ReturnType<T>