@sentry/nextjs
Version:
Official Sentry SDK for Next.js
39 lines • 2.17 kB
TypeScript
import type { NodeClient, NodeOptions } from '@sentry/node';
export * from '@sentry/node';
export { pinoIntegration } from '@sentry/node';
export { captureUnderscoreErrorException } from '../common/pages-router-instrumentation/_error';
export { startSpan, startSpanManual, startInactiveSpan } from '../common/utils/nextSpan';
/**
* EXPERIMENTAL: Next.js-aware variant of `Sentry.experimentalUseDiagnosticsChannelInjection()`
* from `@sentry/node` (see its docs for behavior and caveats).
*
* Next.js bundles the SDK into the server build, from where the runtime module hook can't resolve
* the `@apm-js-collab/tracing-hooks` bare specifier under isolated installs (pnpm). This variant
* points the hook at the package location that `withSentryConfig` resolved at build time.
*
* @experimental May change or be removed in any release.
*/
export declare function experimentalUseDiagnosticsChannelInjection(): void;
/**
* 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 redux enhancer for the server that doesn't depend on anything from the `@sentry/react` package.
*/
export declare function createReduxEnhancer(): (createStore: unknown) => unknown;
/**
* 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;
/** Inits the Sentry NextJS SDK on node. */
export declare function init(options: NodeOptions): NodeClient | undefined;
export * from '../common';
export { wrapApiHandlerWithSentry } from '../common/pages-router-instrumentation/wrapApiHandlerWithSentry';
//# sourceMappingURL=index.d.ts.map