From 857c13158b060d643fb90e6a5f379be1a59cb91a Mon Sep 17 00:00:00 2001 From: Christian Byrne Date: Sun, 26 Oct 2025 02:05:23 -0700 Subject: [PATCH] set Sentry config based on distribution (#6301) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Set the config based on compile-time DISTRIBUTION env var. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6301-set-Sentry-config-based-on-distribution-2986d73d3650815f9b7ef821bbdd745f) by [Unito](https://www.unito.io) --- src/main.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 8e7697148..e063bc18c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -49,11 +49,18 @@ Sentry.init({ dsn: __SENTRY_DSN__, enabled: __SENTRY_ENABLED__, release: __COMFYUI_FRONTEND_VERSION__, - integrations: [], - autoSessionTracking: false, - defaultIntegrations: false, normalizeDepth: 8, - tracesSampleRate: 0 + tracesSampleRate: isCloud ? 1.0 : 0, + replaysSessionSampleRate: 0, + replaysOnErrorSampleRate: 0, + // Only set these for non-cloud builds + ...(isCloud + ? {} + : { + integrations: [], + autoSessionTracking: false, + defaultIntegrations: false + }) }) app.directive('tooltip', Tooltip) app