Skip to content
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
4 changes: 2 additions & 2 deletions packages/astro/src/integration/snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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(', ');
Expand Down
8 changes: 4 additions & 4 deletions packages/astro/test/integration/snippets.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});"
Expand All @@ -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,
});"
Expand All @@ -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,
});"
Expand All @@ -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,
});"
Expand Down