import type { IncomingMessage, ServerResponse } from 'http'; /** * Wraps a function that potentially throws. If it does, the error is passed to `captureException` and rethrown. * * Note: This function turns the wrapped function into an asynchronous one. */ export declare function withErrorInstrumentation any>(origFunction: F): (...params: Parameters) => Promise>; /** * Calls a server-side data fetching function (that takes a `req` and `res` object in its context) with tracing * instrumentation. A transaction will be created for the incoming request (if it doesn't already exist) in addition to * a span for the wrapped data fetching function. * * All of the above happens in an isolated domain, meaning all thrown errors will be associated with the correct span. * * @param origDataFetcher The data fetching method to call. * @param origFunctionArguments The arguments to call the data fetching method with. * @param req The data fetching function's request object. * @param res The data fetching function's response object. * @param options Options providing details for the created transaction and span. * @returns what the data fetching method call returned. */ export declare function withTracedServerSideDataFetcher Promise | any>(origDataFetcher: F, req: IncomingMessage, res: ServerResponse, options: { /** Parameterized route of the request - will be used for naming the transaction. */ requestedRouteName: string; /** Name of the route the data fetcher was defined in - will be used for describing the data fetcher's span. */ dataFetcherRouteName: string; /** Name of the data fetching method - will be used for describing the data fetcher's span. */ dataFetchingMethodName: string; }): (...params: Parameters) => Promise<{ data: ReturnType; sentryTrace?: string; baggage?: string; }>; /** * Call a data fetcher and trace it. Only traces the function if there is an active transaction on the scope. * * We only do the following until we move transaction creation into this function: When called, the wrapped function * will also update the name of the active transaction with a parameterized route provided via the `options` argument. */ export declare function callDataFetcherTraced Promise | any>(origFunction: F, origFunctionArgs: Parameters): Promise>; /** * Extracts the params and searchParams from the props object. * * Depending on the next version, params and searchParams may be a promise which we do not want to resolve in this function. */ export declare function maybeExtractSynchronousParamsAndSearchParams(props: unknown): { params: Record | undefined; searchParams: Record | undefined; }; //# sourceMappingURL=wrapperUtils.d.ts.map