From 1e99e8d29eaee75c1cd91d81484d73a91f865748 Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 24 Mar 2026 02:54:43 +0300 Subject: [PATCH 1/2] 2nd try fix of sentry to use maps instead of chunks --- astro.config.ts | 6 ++++-- src/components/scripts/sentry/client.ts | 8 ++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/astro.config.ts b/astro.config.ts index e30a187fd..949b783de 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -40,7 +40,6 @@ import { createSerializeFunction, pagesJsonWriter } from './src/integrations/sit const devServerPort = Number(process.env['DEV_SERVER_PORT'] ?? 4321) const viteLogger = createLogger(undefined, { allowClearScreen: false }) const sentryAuthToken = process.env['SENTRY_AUTH_TOKEN'] -const sentryRelease = getPackageRelease() const shouldEnableSentryIntegration = Boolean(sentryAuthToken) const shouldSuppressViteWarning = (message: string): boolean => { @@ -85,10 +84,13 @@ const standardIntegrations = [ testimonialsLengthWarning({ min: 300, max: 400 }), /** Enable Sentry build integration when CI provides upload credentials. */ ...(shouldEnableSentryIntegration && sentryAuthToken ? [sentry({ + enabled: { + client: false, + server: true, + }, project: 'webstack-builders-corporate-website', org: 'webstack-builders', authToken: sentryAuthToken, - release: sentryRelease, })] : []), sitemap({ serialize: createSerializeFunction({ diff --git a/src/components/scripts/sentry/client.ts b/src/components/scripts/sentry/client.ts index 15927ed92..d7ea66dfe 100644 --- a/src/components/scripts/sentry/client.ts +++ b/src/components/scripts/sentry/client.ts @@ -1,12 +1,11 @@ import { - BrowserClient, breadcrumbsIntegration, dedupeIntegration, defaultStackParser, feedbackIntegration, - getCurrentScope, globalHandlersIntegration, httpClientIntegration, + init, makeFetchTransport, linkedErrorsIntegration, } from '@sentry/browser' @@ -34,7 +33,7 @@ export class SentryBootstrap { static init(): void { // Check analytics consent for PII handling const hasAnalyticsConsent = getAnalyticsConsentPreference() - const client = new BrowserClient({ + init({ dsn: getSentryDsn(), integrations: [ // Core integrations @@ -103,9 +102,6 @@ export class SentryBootstrap { beforeSend: beforeSendHandler, }) - getCurrentScope().setClient(client) - client.init() - console.log('✅ Sentry monitoring initialized') } } From 7eff6876abb0b70a2eee47725710efc2ca10e08c Mon Sep 17 00:00:00 2001 From: Kevin Brown Date: Tue, 24 Mar 2026 03:15:08 +0300 Subject: [PATCH 2/2] Fix lint error --- astro.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astro.config.ts b/astro.config.ts index 949b783de..c8d3f5079 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -30,7 +30,7 @@ import { import { callToActionValidator } from './src/integrations/CtaValidator' import { faviconGenerator } from './src/integrations/FaviconGenerator' import { privacyPolicyVersion } from './src/integrations/PrivacyPolicyVersion' -import { getPackageRelease, packageRelease } from './src/integrations/PackageRelease' +import { packageRelease } from './src/integrations/PackageRelease' import { testimonialsLengthWarning } from './src/integrations/TestimonialsLengthWarning' import { fixContentAssetPropagation } from './src/lib/plugins/fixContentAssetPropagation' import { pwaDevAssetServer } from './src/lib/plugins/pwaDevAssetServer'