Skip to content

feat(v8): Remove defaultIntegrations deprecated export #10691

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/astro/src/index.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export declare const Integrations: typeof serverSdk.Integrations;

export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;

export declare const defaultIntegrations: Integration[];
export declare const getDefaultIntegrations: (options: Options) => Integration[];
export declare const defaultStackParser: StackParser;

Expand Down
2 changes: 0 additions & 2 deletions packages/browser/src/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ export {
export { eventFromException, eventFromMessage, exceptionFromError } from './eventbuilder';
export { createUserFeedbackEnvelope } from './userfeedback';
export {
// eslint-disable-next-line deprecation/deprecation
defaultIntegrations,
getDefaultIntegrations,
forceLoad,
init,
Expand Down
23 changes: 8 additions & 15 deletions packages/browser/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,17 @@ import { browserApiErrorsIntegration } from './integrations/trycatch';
import { defaultStackParser } from './stack-parsers';
import { makeFetchTransport, makeXHRTransport } from './transports';

/** @deprecated Use `getDefaultIntegrations(options)` instead. */
export const defaultIntegrations = [
inboundFiltersIntegration(),
functionToStringIntegration(),
browserApiErrorsIntegration(),
breadcrumbsIntegration(),
globalHandlersIntegration(),
linkedErrorsIntegration(),
dedupeIntegration(),
httpContextIntegration(),
];

/** Get the default integrations for the browser SDK. */
export function getDefaultIntegrations(_options: Options): Integration[] {
// We return a copy of the defaultIntegrations here to avoid mutating this
return [
// eslint-disable-next-line deprecation/deprecation
...defaultIntegrations,
inboundFiltersIntegration(),
functionToStringIntegration(),
browserApiErrorsIntegration(),
breadcrumbsIntegration(),
globalHandlersIntegration(),
linkedErrorsIntegration(),
dedupeIntegration(),
httpContextIntegration(),
];
}

Expand Down
2 changes: 0 additions & 2 deletions packages/bun/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ export {

export { BunClient } from './client';
export {
// eslint-disable-next-line deprecation/deprecation
defaultIntegrations,
getDefaultIntegrations,
init,
} from './sdk';
Expand Down
42 changes: 18 additions & 24 deletions packages/bun/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,28 @@ import { bunServerIntegration } from './integrations/bunserver';
import { makeFetchTransport } from './transports';
import type { BunOptions } from './types';

/** @deprecated Use `getDefaultIntegrations(options)` instead. */
export const defaultIntegrations = [
// Common
inboundFiltersIntegration(),
functionToStringIntegration(),
linkedErrorsIntegration(),
requestDataIntegration(),
// Native Wrappers
consoleIntegration(),
httpIntegration(),
nativeNodeFetchintegration(),
// Global Handlers # TODO (waiting for https://github.com/oven-sh/bun/issues/5091)
// new NodeIntegrations.OnUncaughtException(),
// new NodeIntegrations.OnUnhandledRejection(),
// Event Info
contextLinesIntegration(),
nodeContextIntegration(),
modulesIntegration(),
// Bun Specific
bunServerIntegration(),
];

/** Get the default integrations for the Bun SDK. */
export function getDefaultIntegrations(_options: Options): Integration[] {
// We return a copy of the defaultIntegrations here to avoid mutating this
return [
// eslint-disable-next-line deprecation/deprecation
...defaultIntegrations,
// Common
inboundFiltersIntegration(),
functionToStringIntegration(),
linkedErrorsIntegration(),
requestDataIntegration(),
// Native Wrappers
consoleIntegration(),
httpIntegration(),
nativeNodeFetchintegration(),
// Global Handlers # TODO (waiting for https://github.com/oven-sh/bun/issues/5091)
// new NodeIntegrations.OnUncaughtException(),
// new NodeIntegrations.OnUnhandledRejection(),
// Event Info
contextLinesIntegration(),
nodeContextIntegration(),
modulesIntegration(),
// Bun Specific
bunServerIntegration(),
];
}

Expand Down
2 changes: 0 additions & 2 deletions packages/deno/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ export type { SpanStatusType } from '@sentry/core';
export { DenoClient } from './client';

export {
// eslint-disable-next-line deprecation/deprecation
defaultIntegrations,
getDefaultIntegrations,
init,
} from './sdk';
Expand Down
38 changes: 16 additions & 22 deletions packages/deno/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,26 @@ import { normalizePathsIntegration } from './integrations/normalizepaths';
import { makeFetchTransport } from './transports';
import type { DenoOptions } from './types';

/** @deprecated Use `getDefaultIntegrations(options)` instead. */
export const defaultIntegrations = [
// Common
inboundFiltersIntegration(),
functionToStringIntegration(),
linkedErrorsIntegration(),
// From Browser
dedupeIntegration(),
breadcrumbsIntegration({
dom: false,
history: false,
xhr: false,
}),
// Deno Specific
denoContextIntegration(),
contextLinesIntegration(),
normalizePathsIntegration(),
globalHandlersIntegration(),
];

/** Get the default integrations for the Deno SDK. */
export function getDefaultIntegrations(_options: Options): Integration[] {
// We return a copy of the defaultIntegrations here to avoid mutating this
return [
// eslint-disable-next-line deprecation/deprecation
...defaultIntegrations,
// Common
inboundFiltersIntegration(),
functionToStringIntegration(),
linkedErrorsIntegration(),
// From Browser
dedupeIntegration(),
breadcrumbsIntegration({
dom: false,
history: false,
xhr: false,
}),
// Deno Specific
denoContextIntegration(),
contextLinesIntegration(),
normalizePathsIntegration(),
globalHandlersIntegration(),
];
}

Expand Down
1 change: 0 additions & 1 deletion packages/nextjs/src/index.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export declare const Integrations: undefined; // TODO(v8): Remove this line. Can

export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;

export declare const defaultIntegrations: Integration[];
export declare const getDefaultIntegrations: (options: Options) => Integration[];
export declare const defaultStackParser: StackParser;

Expand Down
2 changes: 0 additions & 2 deletions packages/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ export { autoDiscoverNodePerformanceMonitoringIntegrations } from './tracing';
export { NodeClient } from './client';
export { makeNodeTransport } from './transports';
export {
// eslint-disable-next-line deprecation/deprecation
defaultIntegrations,
getDefaultIntegrations,
init,
defaultStackParser,
Expand Down
40 changes: 17 additions & 23 deletions packages/node/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,36 +37,30 @@ import { createGetModuleFromFilename } from './module';
import { makeNodeTransport } from './transports';
import type { NodeClientOptions, NodeOptions } from './types';

/** @deprecated Use `getDefaultIntegrations(options)` instead. */
export const defaultIntegrations = [
// Common
inboundFiltersIntegration(),
functionToStringIntegration(),
linkedErrorsIntegration(),
requestDataIntegration(),
// Native Wrappers
consoleIntegration(),
httpIntegration(),
nativeNodeFetchintegration(),
// Global Handlers
onUncaughtExceptionIntegration(),
onUnhandledRejectionIntegration(),
// Event Info
contextLinesIntegration(),
localVariablesIntegration(),
nodeContextIntegration(),
modulesIntegration(),
];

/** Get the default integrations for the Node SDK. */
export function getDefaultIntegrations(_options: Options): Integration[] {
const carrier = getMainCarrier();

const autoloadedIntegrations = carrier.__SENTRY__?.integrations || [];

return [
// eslint-disable-next-line deprecation/deprecation
...defaultIntegrations,
// Common
inboundFiltersIntegration(),
functionToStringIntegration(),
linkedErrorsIntegration(),
requestDataIntegration(),
// Native Wrappers
consoleIntegration(),
httpIntegration(),
nativeNodeFetchintegration(),
// Global Handlers
onUncaughtExceptionIntegration(),
onUnhandledRejectionIntegration(),
// Event Info
contextLinesIntegration(),
localVariablesIntegration(),
nodeContextIntegration(),
modulesIntegration(),
...autoloadedIntegrations,
];
}
Expand Down
2 changes: 0 additions & 2 deletions packages/remix/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ export {
withIsolationScope,
autoDiscoverNodePerformanceMonitoringIntegrations,
makeNodeTransport,
// eslint-disable-next-line deprecation/deprecation
defaultIntegrations,
getDefaultIntegrations,
defaultStackParser,
flush,
Expand Down
1 change: 0 additions & 1 deletion packages/remix/src/index.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export declare const Integrations: typeof clientSdk.Integrations & typeof server

export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;

export declare const defaultIntegrations: Integration[];
export declare const getDefaultIntegrations: (options: Options) => Integration[];
export declare const defaultStackParser: StackParser;

Expand Down
8 changes: 0 additions & 8 deletions packages/serverless/src/awslambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
captureException,
captureMessage,
continueTrace,
defaultIntegrations as nodeDefaultIntegrations,
flush,
getCurrentScope,
getDefaultIntegrations as getNodeDefaultIntegrations,
Expand Down Expand Up @@ -66,13 +65,6 @@ export interface WrapperOptions {
startTrace: boolean;
}

/** @deprecated Use `getDefaultIntegrations(options)` instead. */
export const defaultIntegrations: Integration[] = [
// eslint-disable-next-line deprecation/deprecation
...nodeDefaultIntegrations,
awsServicesIntegration({ optional: true }),
];

/** Get the default integrations for the AWSLambda SDK. */
export function getDefaultIntegrations(options: Options): Integration[] {
return [...getNodeDefaultIntegrations(options), awsServicesIntegration({ optional: true })];
Expand Down
15 changes: 1 addition & 14 deletions packages/serverless/src/gcpfunction/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import type { NodeOptions } from '@sentry/node';
import {
SDK_VERSION,
defaultIntegrations as defaultNodeIntegrations,
getDefaultIntegrations as getDefaultNodeIntegrations,
init as initNode,
} from '@sentry/node';
import { SDK_VERSION, getDefaultIntegrations as getDefaultNodeIntegrations, init as initNode } from '@sentry/node';
import type { Integration, Options, SdkMetadata } from '@sentry/types';

import { googleCloudGrpcIntegration } from '../google-cloud-grpc';
Expand All @@ -14,14 +9,6 @@ export * from './http';
export * from './events';
export * from './cloud_events';

/** @deprecated Use `getDefaultIntegrations(options)` instead. */
export const defaultIntegrations: Integration[] = [
// eslint-disable-next-line deprecation/deprecation
...defaultNodeIntegrations,
googleCloudHttpIntegration({ optional: true }), // We mark this integration optional since '@google-cloud/common' module could be missing.
googleCloudGrpcIntegration({ optional: true }), // We mark this integration optional since 'google-gax' module could be missing.
];

/** Get the default integrations for the GCP SDK. */
export function getDefaultIntegrations(options: Options): Integration[] {
return [
Expand Down
2 changes: 0 additions & 2 deletions packages/serverless/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ export {
NodeClient,
makeNodeTransport,
close,
// eslint-disable-next-line deprecation/deprecation
defaultIntegrations,
getDefaultIntegrations,
defaultStackParser,
flush,
Expand Down
1 change: 0 additions & 1 deletion packages/sveltekit/src/index.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export declare const Integrations: typeof clientSdk.Integrations & typeof server

export declare const linkedErrorsIntegration: typeof clientSdk.linkedErrorsIntegration;

export declare const defaultIntegrations: Integration[];
export declare const getDefaultIntegrations: (options: Options) => Integration[];
export declare const defaultStackParser: StackParser;

Expand Down
2 changes: 0 additions & 2 deletions packages/sveltekit/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export {
withIsolationScope,
autoDiscoverNodePerformanceMonitoringIntegrations,
makeNodeTransport,
// eslint-disable-next-line deprecation/deprecation
defaultIntegrations,
getDefaultIntegrations,
defaultStackParser,
flush,
Expand Down
2 changes: 0 additions & 2 deletions packages/vercel-edge/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ export type { SpanStatusType } from '@sentry/core';

export { VercelEdgeClient } from './client';
export {
// eslint-disable-next-line deprecation/deprecation
defaultIntegrations,
getDefaultIntegrations,
init,
} from './sdk';
Expand Down
14 changes: 4 additions & 10 deletions packages/vercel-edge/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,13 @@ declare const process: {

const nodeStackParser = createStackParser(nodeStackLineParser());

/** @deprecated Use `getDefaultIntegrations(options)` instead. */
export const defaultIntegrations = [
inboundFiltersIntegration(),
functionToStringIntegration(),
linkedErrorsIntegration(),
winterCGFetchIntegration(),
];

/** Get the default integrations for the browser SDK. */
export function getDefaultIntegrations(options: Options): Integration[] {
return [
// eslint-disable-next-line deprecation/deprecation
...defaultIntegrations,
inboundFiltersIntegration(),
functionToStringIntegration(),
linkedErrorsIntegration(),
winterCGFetchIntegration(),
...(options.sendDefaultPii ? [requestDataIntegration()] : []),
];
}
Expand Down