@sentry/nextjs
Version:
Official Sentry SDK for Next.js
131 lines (130 loc) • 8.17 kB
TypeScript
/// <reference types="react" />
import { NodeOptions } from '@sentry/node';
import { Http } from './httpIntegration';
import { OnUncaughtException } from './onUncaughtExceptionIntegration';
import { rewriteFramesIntegration } from './rewriteFramesIntegration';
export { createReduxEnhancer } from '@sentry/react';
export * from '@sentry/node';
export { captureUnderscoreErrorException } from '../common/_error';
export declare const Integrations: {
Http: typeof Http;
OnUncaughtException: typeof OnUncaughtException;
Apollo: typeof import("@sentry-internal/tracing").Apollo;
Express: typeof import("@sentry-internal/tracing").Express;
GraphQL: typeof import("@sentry-internal/tracing").GraphQL;
Mongo: typeof import("@sentry-internal/tracing").Mongo;
Mysql: typeof import("@sentry-internal/tracing").Mysql; /** Inits the Sentry NextJS SDK on node. */
Postgres: typeof import("@sentry-internal/tracing").Postgres;
Prisma: typeof import("@sentry-internal/tracing").Prisma;
Console: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
setup: (client: import("@sentry/types").Client<import("@sentry/types").ClientOptions<import("@sentry/types").BaseTransportOptions>>) => void;
}>;
OnUnhandledRejection: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
setup: (client: import("@sentry/types").Client<import("@sentry/types").ClientOptions<import("@sentry/types").BaseTransportOptions>>) => void;
}> & (new (options?: Partial<{
mode: "warn" | "none" | "strict";
}> | undefined) => import("@sentry/types").Integration);
Modules: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
processEvent: (event: import("@sentry/node").Event) => import("@sentry/node").Event;
}>;
ContextLines: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
processEvent: (event: import("@sentry/node").Event) => Promise<import("@sentry/node").Event>;
}> & (new (options?: {
frameContextLines?: number | undefined;
} | undefined) => import("@sentry/types").Integration);
Context: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
processEvent: (event: import("@sentry/node").Event) => Promise<import("@sentry/node").Event>;
}> & (new (options?: {
app?: boolean | undefined;
os?: boolean | undefined;
device?: boolean | {
cpu?: boolean | undefined;
memory?: boolean | undefined;
} | undefined;
culture?: boolean | undefined;
cloudResource?: boolean | undefined;
} | undefined) => import("@sentry/types").Integration);
RequestData: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
processEvent: (event: import("@sentry/node").Event, hint: import("@sentry/node").EventHint, client: import("@sentry/types").Client<import("@sentry/types").ClientOptions<import("@sentry/types").BaseTransportOptions>>) => import("@sentry/node").Event;
}> & (new (options?: {
include?: {
cookies?: boolean | undefined;
data?: boolean | undefined;
headers?: boolean | undefined;
ip?: boolean | undefined;
query_string?: boolean | undefined;
url?: boolean | undefined;
user?: boolean | {
id?: boolean | undefined;
username?: boolean | undefined;
email?: boolean | undefined;
} | undefined;
} | undefined;
transactionNamingScheme?: import("@sentry/node").TransactionNamingScheme | undefined;
} | undefined) => import("@sentry/types").Integration);
LocalVariables: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
processEvent: (event: import("@sentry/node").Event) => import("@sentry/node").Event;
setup: (client: import("@sentry/node").NodeClient) => void;
}> & (new (options?: import("@sentry/node/build/types/integrations/local-variables/common").Options | undefined, session?: import("@sentry/node/build/types/integrations/local-variables/local-variables-sync").DebugSession | undefined) => import("@sentry/types").Integration);
Undici: typeof import("@sentry/node/build/types/integrations").Undici;
Spotlight: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
setup: (client: import("@sentry/types").Client<import("@sentry/types").ClientOptions<import("@sentry/types").BaseTransportOptions>>) => void;
}> & (new (options?: Partial<{
sidecarUrl?: string | undefined;
}> | undefined) => import("@sentry/types").Integration);
Anr: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
setup: (client: import("@sentry/node").NodeClient) => void;
}> & (new (options?: Partial<import("@sentry/node/build/types/integrations/anr/common").Options> | undefined) => import("@sentry/types").Integration & {
setup(client: import("@sentry/types").Client<import("@sentry/types").ClientOptions<import("@sentry/types").BaseTransportOptions>>): void;
});
Hapi: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration>;
FunctionToString: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
setupOnce: () => void;
}>;
InboundFilters: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
preprocessEvent: (event: import("@sentry/node").Event, hint: import("@sentry/node").EventHint, client: import("@sentry/types").Client<import("@sentry/types").ClientOptions<import("@sentry/types").BaseTransportOptions>>) => void;
}> & (new (options?: Partial<{
allowUrls: (string | RegExp)[];
denyUrls: (string | RegExp)[];
ignoreErrors: (string | RegExp)[];
ignoreTransactions: (string | RegExp)[];
ignoreInternal: boolean;
disableErrorDefaults: boolean;
disableTransactionDefaults: boolean;
}> | undefined) => import("@sentry/types").Integration);
LinkedErrors: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration & {
preprocessEvent: (event: import("@sentry/node").Event, hint: import("@sentry/node").EventHint, client: import("@sentry/types").Client<import("@sentry/types").ClientOptions<import("@sentry/types").BaseTransportOptions>>) => void;
}> & (new (options?: {
key?: string | undefined;
limit?: number | undefined;
} | undefined) => import("@sentry/types").Integration);
};
export { rewriteFramesIntegration };
/**
* A passthrough error boundary for the server that doesn't depend on any react. Error boundaries don't catch SSR errors
* so they should simply be a passthrough.
*/
export declare const ErrorBoundary: (props: React.PropsWithChildren<unknown>) => React.ReactNode;
/**
* A passthrough error boundary wrapper for the server that doesn't depend on any react. Error boundaries don't catch
* SSR errors so they should simply be a passthrough.
*/
export declare function withErrorBoundary<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>): React.FC<P>;
/**
* Just a passthrough since we're on the server and showing the report dialog on the server doesn't make any sense.
*/
export declare function showReportDialog(): void;
/**
* @deprecated This constant will be removed in the next major update.
*/
export declare const IS_BUILD: boolean;
/** Inits the Sentry NextJS SDK on node. */
export declare function init(options: NodeOptions): void;
/**
* @deprecated This constant will be removed in the next major update.
*/
declare const deprecatedIsBuild: () => boolean;
export { deprecatedIsBuild as isBuild };
export * from '../common';
export { withSentry, withSentryAPI, wrapApiHandlerWithSentry, } from '../common/wrapApiHandlerWithSentry';
//# sourceMappingURL=index.d.ts.map