diff --git a/packages/bun/src/sdk.ts b/packages/bun/src/sdk.ts index d512e7208bf5..ea4702b6b19b 100644 --- a/packages/bun/src/sdk.ts +++ b/packages/bun/src/sdk.ts @@ -11,6 +11,7 @@ export const defaultIntegrations = [ // Common new CoreIntegrations.InboundFilters(), new CoreIntegrations.FunctionToString(), + new CoreIntegrations.LinkedErrors(), // Native Wrappers new NodeIntegrations.Console(), new NodeIntegrations.Http(), @@ -24,8 +25,6 @@ export const defaultIntegrations = [ new NodeIntegrations.Context(), new NodeIntegrations.Modules(), new NodeIntegrations.RequestData(), - // Misc - new NodeIntegrations.LinkedErrors(), // Bun Specific new BunServer(), ]; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index b80c83cdfdfa..a912475e6c41 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -48,7 +48,7 @@ export { makeOfflineTransport } from './transports/offline'; export { makeMultiplexedTransport } from './transports/multiplexed'; export { SDK_VERSION } from './version'; export { getIntegrationsToSetup, addIntegration } from './integration'; -export { FunctionToString, InboundFilters } from './integrations'; +export { FunctionToString, InboundFilters, LinkedErrors } from './integrations'; export { prepareEvent } from './utils/prepareEvent'; export { createCheckInEnvelope } from './checkin'; export { hasTracingEnabled } from './utils/hasTracingEnabled'; diff --git a/packages/core/src/integrations/index.ts b/packages/core/src/integrations/index.ts index ddb199ef4e5f..5e81ff7a7754 100644 --- a/packages/core/src/integrations/index.ts +++ b/packages/core/src/integrations/index.ts @@ -1,2 +1,3 @@ export { FunctionToString } from './functiontostring'; export { InboundFilters } from './inboundfilters'; +export { LinkedErrors } from './linkederrors'; diff --git a/packages/node/src/integrations/linkederrors.ts b/packages/core/src/integrations/linkederrors.ts similarity index 94% rename from packages/node/src/integrations/linkederrors.ts rename to packages/core/src/integrations/linkederrors.ts index de2a6e0cc1e8..1b3ef1c39a19 100644 --- a/packages/node/src/integrations/linkederrors.ts +++ b/packages/core/src/integrations/linkederrors.ts @@ -14,7 +14,7 @@ export class LinkedErrors implements Integration { /** * @inheritDoc */ - public readonly name: string = LinkedErrors.id; + public readonly name: string; /** * @inheritDoc @@ -32,6 +32,7 @@ export class LinkedErrors implements Integration { public constructor(options: { key?: string; limit?: number } = {}) { this._key = options.key || DEFAULT_KEY; this._limit = options.limit || DEFAULT_LIMIT; + this.name = LinkedErrors.id; } /** @inheritdoc */ diff --git a/packages/deno/src/sdk.ts b/packages/deno/src/sdk.ts index cff16148453e..52de20ffd6fd 100644 --- a/packages/deno/src/sdk.ts +++ b/packages/deno/src/sdk.ts @@ -1,4 +1,4 @@ -import { Breadcrumbs, Dedupe, LinkedErrors } from '@sentry/browser'; +import { Breadcrumbs, Dedupe } from '@sentry/browser'; import type { ServerRuntimeClientOptions } from '@sentry/core'; import { getIntegrationsToSetup, initAndBind, Integrations as CoreIntegrations } from '@sentry/core'; import type { StackParser } from '@sentry/types'; @@ -13,9 +13,9 @@ export const defaultIntegrations = [ // Common new CoreIntegrations.InboundFilters(), new CoreIntegrations.FunctionToString(), + new CoreIntegrations.LinkedErrors(), // From Browser new Dedupe(), - new LinkedErrors(), new Breadcrumbs({ dom: false, history: false, diff --git a/packages/deno/test/__snapshots__/mod.test.ts.snap b/packages/deno/test/__snapshots__/mod.test.ts.snap index 501508e1a268..67823708e07e 100644 --- a/packages/deno/test/__snapshots__/mod.test.ts.snap +++ b/packages/deno/test/__snapshots__/mod.test.ts.snap @@ -140,8 +140,8 @@ snapshot[`captureException 1`] = ` integrations: [ "InboundFilters", "FunctionToString", - "Dedupe", "LinkedErrors", + "Dedupe", "Breadcrumbs", "DenoContext", "ContextLines", @@ -200,8 +200,8 @@ snapshot[`captureMessage 1`] = ` integrations: [ "InboundFilters", "FunctionToString", - "Dedupe", "LinkedErrors", + "Dedupe", "Breadcrumbs", "DenoContext", "ContextLines", diff --git a/packages/node-experimental/src/integrations/index.ts b/packages/node-experimental/src/integrations/index.ts index 35858c52c7a1..b625872d2fb7 100644 --- a/packages/node-experimental/src/integrations/index.ts +++ b/packages/node-experimental/src/integrations/index.ts @@ -4,7 +4,6 @@ const { Console, OnUncaughtException, OnUnhandledRejection, - LinkedErrors, Modules, ContextLines, Context, @@ -16,7 +15,6 @@ export { Console, OnUncaughtException, OnUnhandledRejection, - LinkedErrors, Modules, ContextLines, Context, diff --git a/packages/node/src/integrations/index.ts b/packages/node/src/integrations/index.ts index 79fd4f93541a..62e7b58e85b2 100644 --- a/packages/node/src/integrations/index.ts +++ b/packages/node/src/integrations/index.ts @@ -2,7 +2,6 @@ export { Console } from './console'; export { Http } from './http'; export { OnUncaughtException } from './onuncaughtexception'; export { OnUnhandledRejection } from './onunhandledrejection'; -export { LinkedErrors } from './linkederrors'; export { Modules } from './modules'; export { ContextLines } from './contextlines'; export { Context } from './context'; diff --git a/packages/node/src/sdk.ts b/packages/node/src/sdk.ts index 7bb0257fc463..a01cdfbcae23 100644 --- a/packages/node/src/sdk.ts +++ b/packages/node/src/sdk.ts @@ -23,7 +23,6 @@ import { Context, ContextLines, Http, - LinkedErrors, LocalVariables, Modules, OnUncaughtException, @@ -39,6 +38,7 @@ export const defaultIntegrations = [ // Common new CoreIntegrations.InboundFilters(), new CoreIntegrations.FunctionToString(), + new CoreIntegrations.LinkedErrors(), // Native Wrappers new Console(), new Http(), @@ -52,8 +52,6 @@ export const defaultIntegrations = [ new Context(), new Modules(), new RequestData(), - // Misc - new LinkedErrors(), ]; /** diff --git a/packages/node/test/index.test.ts b/packages/node/test/index.test.ts index 6ee7b526ca86..24f2b95e398b 100644 --- a/packages/node/test/index.test.ts +++ b/packages/node/test/index.test.ts @@ -1,4 +1,4 @@ -import { getMainCarrier, initAndBind, runWithAsyncContext, SDK_VERSION } from '@sentry/core'; +import { getMainCarrier, initAndBind, LinkedErrors, runWithAsyncContext, SDK_VERSION } from '@sentry/core'; import type { EventHint, Integration } from '@sentry/types'; import type { Event, Scope } from '../src'; @@ -13,7 +13,7 @@ import { NodeClient, } from '../src'; import { setNodeAsyncContextStrategy } from '../src/async'; -import { ContextLines, LinkedErrors } from '../src/integrations'; +import { ContextLines } from '../src/integrations'; import { defaultStackParser } from '../src/sdk'; import type { NodeClientOptions } from '../src/types'; import { getDefaultNodeClientOptions } from './helper/node-client-options'; diff --git a/packages/vercel-edge/src/sdk.ts b/packages/vercel-edge/src/sdk.ts index f2c57c7f9546..417c55bf809e 100644 --- a/packages/vercel-edge/src/sdk.ts +++ b/packages/vercel-edge/src/sdk.ts @@ -13,7 +13,11 @@ declare const process: { const nodeStackParser = createStackParser(nodeStackLineParser()); -export const defaultIntegrations = [new CoreIntegrations.InboundFilters(), new CoreIntegrations.FunctionToString()]; +export const defaultIntegrations = [ + new CoreIntegrations.InboundFilters(), + new CoreIntegrations.FunctionToString(), + new CoreIntegrations.LinkedErrors(), +]; /** Inits the Sentry NextJS SDK on the Edge Runtime. */ export function init(options: VercelEdgeOptions = {}): void {