diff --git a/docs/migration/draft-v9-migration-guide.md b/docs/migration/draft-v9-migration-guide.md index 8b0cebd7e51d..1c85f0a9fd2d 100644 --- a/docs/migration/draft-v9-migration-guide.md +++ b/docs/migration/draft-v9-migration-guide.md @@ -11,6 +11,8 @@ ## `@sentry/core` - Deprecated `transactionNamingScheme` option in `requestDataIntegration`. +- Deprecated `debugIntegration`. To log outgoing events, use [Hook Options](https://docs.sentry.io/platforms/javascript/configuration/options/#hooks) (`beforeSend`, `beforeSendTransaction`, ...). +- Deprecated `sessionTimingIntegration`. To capture session durations alongside events, use [Context](https://docs.sentry.io/platforms/javascript/enriching-events/context/) (`Sentry.setContext()`). ## `@sentry/types` diff --git a/package.json b/package.json index ce3f91932c64..39139d5faba0 100644 --- a/package.json +++ b/package.json @@ -152,11 +152,13 @@ "proseWrap": "always", "singleQuote": true, "trailingComma": "all", - "overrides": [{ - "files": "CHANGELOG.md", - "options": { - "proseWrap": "preserve" + "overrides": [ + { + "files": "*.md", + "options": { + "proseWrap": "preserve" + } } - }] + ] } } diff --git a/packages/astro/src/index.server.ts b/packages/astro/src/index.server.ts index 853623abbc8a..7f0d5cc40ada 100644 --- a/packages/astro/src/index.server.ts +++ b/packages/astro/src/index.server.ts @@ -31,6 +31,7 @@ export { createTransport, cron, dataloaderIntegration, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, DEFAULT_USER_INCLUDES, @@ -103,6 +104,7 @@ export { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, setContext, setCurrentClient, diff --git a/packages/aws-serverless/src/index.ts b/packages/aws-serverless/src/index.ts index 8341b01719c1..1156887a691c 100644 --- a/packages/aws-serverless/src/index.ts +++ b/packages/aws-serverless/src/index.ts @@ -124,10 +124,12 @@ export { export { captureConsoleIntegration, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, } from '@sentry/core'; diff --git a/packages/browser/src/index.ts b/packages/browser/src/index.ts index 56724b926c5b..bc720295b090 100644 --- a/packages/browser/src/index.ts +++ b/packages/browser/src/index.ts @@ -6,9 +6,11 @@ export { contextLinesIntegration } from './integrations/contextlines'; export { captureConsoleIntegration, + // eslint-disable-next-line deprecation/deprecation debugIntegration, extraErrorDataIntegration, rewriteFramesIntegration, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, captureFeedback, } from '@sentry/core'; diff --git a/packages/browser/src/integrations-bundle/index.debug.ts b/packages/browser/src/integrations-bundle/index.debug.ts index c6da394f3a13..7449888ce0ed 100644 --- a/packages/browser/src/integrations-bundle/index.debug.ts +++ b/packages/browser/src/integrations-bundle/index.debug.ts @@ -1,2 +1,3 @@ +// eslint-disable-next-line deprecation/deprecation export { debugIntegration } from '@sentry/core'; export { spotlightBrowserIntegration } from '../integrations/spotlight'; diff --git a/packages/browser/src/integrations-bundle/index.sessiontiming.ts b/packages/browser/src/integrations-bundle/index.sessiontiming.ts index ae495a70cc49..b601f2eb973b 100644 --- a/packages/browser/src/integrations-bundle/index.sessiontiming.ts +++ b/packages/browser/src/integrations-bundle/index.sessiontiming.ts @@ -1 +1,2 @@ +// eslint-disable-next-line deprecation/deprecation export { sessionTimingIntegration } from '@sentry/core'; diff --git a/packages/bun/src/index.ts b/packages/bun/src/index.ts index d8c97d6e8246..92d25051ebd7 100644 --- a/packages/bun/src/index.ts +++ b/packages/bun/src/index.ts @@ -144,10 +144,12 @@ export { export { captureConsoleIntegration, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, } from '@sentry/core'; diff --git a/packages/cloudflare/src/index.ts b/packages/cloudflare/src/index.ts index 4115874aa5e5..ab4db3064290 100644 --- a/packages/cloudflare/src/index.ts +++ b/packages/cloudflare/src/index.ts @@ -74,6 +74,7 @@ export { linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, rewriteFramesIntegration, diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 598b0168f3ef..779c01830d92 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -92,10 +92,12 @@ export { linkedErrorsIntegration } from './integrations/linkederrors'; export { moduleMetadataIntegration } from './integrations/metadata'; export { requestDataIntegration } from './integrations/requestdata'; export { captureConsoleIntegration } from './integrations/captureconsole'; +// eslint-disable-next-line deprecation/deprecation export { debugIntegration } from './integrations/debug'; export { dedupeIntegration } from './integrations/dedupe'; export { extraErrorDataIntegration } from './integrations/extraerrordata'; export { rewriteFramesIntegration } from './integrations/rewriteframes'; +// eslint-disable-next-line deprecation/deprecation export { sessionTimingIntegration } from './integrations/sessiontiming'; export { zodErrorsIntegration } from './integrations/zoderrors'; export { thirdPartyErrorFilterIntegration } from './integrations/third-party-errors-filter'; diff --git a/packages/core/src/integrations/debug.ts b/packages/core/src/integrations/debug.ts index 83ac43de97b9..a74895ec216b 100644 --- a/packages/core/src/integrations/debug.ts +++ b/packages/core/src/integrations/debug.ts @@ -11,10 +11,6 @@ interface DebugOptions { debugger?: boolean; } -/** - * Integration to debug sent Sentry events. - * This integration should not be used in production. - */ const _debugIntegration = ((options: DebugOptions = {}) => { const _options = { debugger: false, @@ -51,4 +47,11 @@ const _debugIntegration = ((options: DebugOptions = {}) => { }; }) satisfies IntegrationFn; +/** + * Integration to debug sent Sentry events. + * This integration should not be used in production. + * + * @deprecated This integration is deprecated and will be removed in the next major version of the SDK. + * To log outgoing events, use [Hook Options](https://docs.sentry.io/platforms/javascript/configuration/options/#hooks) (`beforeSend`, `beforeSendTransaction`, ...). + */ export const debugIntegration = defineIntegration(_debugIntegration); diff --git a/packages/core/src/integrations/sessiontiming.ts b/packages/core/src/integrations/sessiontiming.ts index 4664893915e0..3b4a68fe792c 100644 --- a/packages/core/src/integrations/sessiontiming.ts +++ b/packages/core/src/integrations/sessiontiming.ts @@ -28,5 +28,8 @@ const _sessionTimingIntegration = (() => { /** * This function adds duration since the sessionTimingIntegration was initialized * till the time event was sent. + * + * @deprecated This integration is deprecated and will be removed in the next major version of the SDK. + * To capture session durations alongside events, use [Context](https://docs.sentry.io/platforms/javascript/enriching-events/context/) (`Sentry.setContext()`). */ export const sessionTimingIntegration = defineIntegration(_sessionTimingIntegration); diff --git a/packages/core/test/lib/integrations/debug.test.ts b/packages/core/test/lib/integrations/debug.test.ts index c391d3057f0e..87e1027af6e0 100644 --- a/packages/core/test/lib/integrations/debug.test.ts +++ b/packages/core/test/lib/integrations/debug.test.ts @@ -3,6 +3,7 @@ import type { Client, Event, EventHint } from '@sentry/types'; import { debugIntegration } from '../../../src/integrations/debug'; function testEventLogged( + // eslint-disable-next-line deprecation/deprecation integration: ReturnType, testEvent?: Event, testEventHint?: EventHint, @@ -42,6 +43,7 @@ describe('Debug integration setup should register an event processor that', () = }); it('logs an event', () => { + // eslint-disable-next-line deprecation/deprecation const debug = debugIntegration(); const testEvent = { event_id: 'some event' }; @@ -52,6 +54,7 @@ describe('Debug integration setup should register an event processor that', () = }); it('logs an event hint if available', () => { + // eslint-disable-next-line deprecation/deprecation const debug = debugIntegration(); const testEvent = { event_id: 'some event' }; @@ -65,6 +68,7 @@ describe('Debug integration setup should register an event processor that', () = }); it('logs events in stringified format when `stringify` option was set', () => { + // eslint-disable-next-line deprecation/deprecation const debug = debugIntegration({ stringify: true }); const testEvent = { event_id: 'some event' }; @@ -75,6 +79,7 @@ describe('Debug integration setup should register an event processor that', () = }); it('logs event hints in stringified format when `stringify` option was set', () => { + // eslint-disable-next-line deprecation/deprecation const debug = debugIntegration({ stringify: true }); const testEvent = { event_id: 'some event' }; diff --git a/packages/core/test/lib/integrations/sessiontiming.test.ts b/packages/core/test/lib/integrations/sessiontiming.test.ts index 6213d7cae9c1..1fd2fa53e361 100644 --- a/packages/core/test/lib/integrations/sessiontiming.test.ts +++ b/packages/core/test/lib/integrations/sessiontiming.test.ts @@ -1,6 +1,7 @@ import type { Event } from '@sentry/types'; import { sessionTimingIntegration } from '../../../src/integrations/sessiontiming'; +// eslint-disable-next-line deprecation/deprecation const sessionTiming = sessionTimingIntegration(); describe('SessionTiming', () => { diff --git a/packages/deno/src/index.ts b/packages/deno/src/index.ts index 3531074793f3..7d13ad9e833c 100644 --- a/packages/deno/src/index.ts +++ b/packages/deno/src/index.ts @@ -71,10 +71,12 @@ export { functionToStringIntegration, requestDataIntegration, captureConsoleIntegration, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, zodErrorsIntegration, SEMANTIC_ATTRIBUTE_SENTRY_OP, diff --git a/packages/google-cloud-serverless/src/index.ts b/packages/google-cloud-serverless/src/index.ts index 53cf4c026868..87349a502f0f 100644 --- a/packages/google-cloud-serverless/src/index.ts +++ b/packages/google-cloud-serverless/src/index.ts @@ -124,10 +124,12 @@ export { export { captureConsoleIntegration, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, } from '@sentry/core'; diff --git a/packages/node/src/index.ts b/packages/node/src/index.ts index cc81dce37577..92ef7e6be7f7 100644 --- a/packages/node/src/index.ts +++ b/packages/node/src/index.ts @@ -114,10 +114,12 @@ export { captureMessage, captureFeedback, captureConsoleIntegration, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, // eslint-disable-next-line deprecation/deprecation metricsDefault as metrics, diff --git a/packages/remix/src/index.server.ts b/packages/remix/src/index.server.ts index 1291a3fb8767..9fb2654cc375 100644 --- a/packages/remix/src/index.server.ts +++ b/packages/remix/src/index.server.ts @@ -35,6 +35,7 @@ export { createGetModuleFromFilename, createTransport, cron, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, DEFAULT_USER_INCLUDES, @@ -100,6 +101,7 @@ export { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, setContext, setCurrentClient, diff --git a/packages/solidstart/src/server/index.ts b/packages/solidstart/src/server/index.ts index 54e0e8cf68ab..780f9fe7fa12 100644 --- a/packages/solidstart/src/server/index.ts +++ b/packages/solidstart/src/server/index.ts @@ -26,6 +26,7 @@ export { createGetModuleFromFilename, createTransport, cron, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, DEFAULT_USER_INCLUDES, @@ -91,6 +92,7 @@ export { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, setContext, setCurrentClient, diff --git a/packages/sveltekit/src/server/index.ts b/packages/sveltekit/src/server/index.ts index 05f105c252a8..81388a0d1946 100644 --- a/packages/sveltekit/src/server/index.ts +++ b/packages/sveltekit/src/server/index.ts @@ -26,6 +26,7 @@ export { createGetModuleFromFilename, createTransport, cron, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, DEFAULT_USER_INCLUDES, @@ -93,6 +94,7 @@ export { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, + // eslint-disable-next-line deprecation/deprecation sessionTimingIntegration, setContext, setCurrentClient, diff --git a/packages/vercel-edge/src/index.ts b/packages/vercel-edge/src/index.ts index 4eea3f90d2d8..cbd51687aca7 100644 --- a/packages/vercel-edge/src/index.ts +++ b/packages/vercel-edge/src/index.ts @@ -74,6 +74,7 @@ export { linkedErrorsIntegration, requestDataIntegration, extraErrorDataIntegration, + // eslint-disable-next-line deprecation/deprecation debugIntegration, dedupeIntegration, rewriteFramesIntegration,