import { NodeOptions } from '@sentry/node'; import { Integration, Options } from '@sentry/types'; import { Handler } from 'aws-lambda'; export * from '@sentry/node'; export type AsyncHandler = (event: Parameters[0], context: Parameters[1]) => Promise[2]>[1]>>; export interface WrapperOptions { flushTimeout: number; /** * @deprecated This option is unused since v6 and will be removed in v8. */ rethrowAfterCapture?: boolean; callbackWaitsForEmptyEventLoop: boolean; captureTimeoutWarning: boolean; timeoutWarningLimit: number; /** * Capture all errors when `Promise.allSettled` is returned by the handler * The {@link wrapHandler} will not fail the lambda even if there are errors * @default false */ captureAllSettledReasons: boolean; /** * Automatically trace all handler invocations. * You may want to disable this if you use express within Lambda (use tracingHandler instead). * @default true */ startTrace: boolean; } /** @deprecated Use `getDefaultIntegrations(options)` instead. */ export declare const defaultIntegrations: Integration[]; /** Get the default integrations for the AWSLambda SDK. */ export declare function getDefaultIntegrations(options: Options): Integration[]; interface AWSLambdaOptions extends NodeOptions { /** * Internal field that is set to `true` when init() is called by the Sentry AWS Lambda layer. * */ _invokedByLambdaLayer?: boolean; } /** * Initializes the Sentry AWS Lambda SDK. * * @param options Configuration options for the SDK, @see {@link AWSLambdaOptions}. */ export declare function init(options?: AWSLambdaOptions): void; /** */ export declare function tryPatchHandler(taskRoot: string, handlerPath: string): void; /** * Wraps a lambda handler adding it error capture and tracing capabilities. * * @param handler Handler * @param options Options * @returns Handler */ export declare function wrapHandler(handler: Handler, wrapOptions?: Partial): Handler; //# sourceMappingURL=awslambda.d.ts.map