From 830e32d2a4ebbb3b9b93f3fea506dd6da5ef084d Mon Sep 17 00:00:00 2001 From: s1gr1d Date: Wed, 21 Feb 2024 14:32:01 +0100 Subject: [PATCH] remove deprecated integrations --- packages/astro/src/integration/snippets.ts | 4 ++-- packages/astro/test/integration/snippets.test.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/integration/snippets.ts b/packages/astro/src/integration/snippets.ts index ad5047e9954a..c46267080aa8 100644 --- a/packages/astro/src/integration/snippets.ts +++ b/packages/astro/src/integration/snippets.ts @@ -57,7 +57,7 @@ const buildClientIntegrations = (options: SentryOptions): string => { const integrations: string[] = []; if (options.tracesSampleRate == null || options.tracesSampleRate) { - integrations.push('new Sentry.BrowserTracing()'); + integrations.push('Sentry.browserTracingIntegration()'); } if ( @@ -66,7 +66,7 @@ const buildClientIntegrations = (options: SentryOptions): string => { options.replaysOnErrorSampleRate == null || options.replaysOnErrorSampleRate ) { - integrations.push('new Sentry.Replay()'); + integrations.push('Sentry.replayIntegration()'); } return integrations.join(', '); diff --git a/packages/astro/test/integration/snippets.test.ts b/packages/astro/test/integration/snippets.test.ts index 172756847a5c..ddd7188d9b18 100644 --- a/packages/astro/test/integration/snippets.test.ts +++ b/packages/astro/test/integration/snippets.test.ts @@ -23,7 +23,7 @@ describe('buildClientSnippet', () => { environment: import.meta.env.PUBLIC_VERCEL_ENV, release: import.meta.env.PUBLIC_VERCEL_GIT_COMMIT_SHA, tracesSampleRate: 1, - integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()], + integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()], replaysSessionSampleRate: 0.1, replaysOnErrorSampleRate: 1, });" @@ -43,7 +43,7 @@ describe('buildClientSnippet', () => { release: \\"1.0.0\\", tracesSampleRate: 0.3, sampleRate: 0.2, - integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()], + integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()], replaysSessionSampleRate: 0.5, replaysOnErrorSampleRate: 0.4, });" @@ -61,7 +61,7 @@ describe('buildClientSnippet', () => { environment: import.meta.env.PUBLIC_VERCEL_ENV, release: import.meta.env.PUBLIC_VERCEL_GIT_COMMIT_SHA, tracesSampleRate: 0, - integrations: [new Sentry.Replay()], + integrations: [Sentry.replayIntegration()], replaysSessionSampleRate: 0.1, replaysOnErrorSampleRate: 1, });" @@ -80,7 +80,7 @@ it('does not include Replay if replay sample ratest are 0', () => { environment: import.meta.env.PUBLIC_VERCEL_ENV, release: import.meta.env.PUBLIC_VERCEL_GIT_COMMIT_SHA, tracesSampleRate: 1, - integrations: [new Sentry.BrowserTracing()], + integrations: [Sentry.browserTracingIntegration()], replaysSessionSampleRate: 0, replaysOnErrorSampleRate: 0, });"