Skip to content

Commit 857c131

Browse files
set Sentry config based on distribution (#6301)
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)
1 parent cd50c54 commit 857c131

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/main.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,18 @@ Sentry.init({
4949
dsn: __SENTRY_DSN__,
5050
enabled: __SENTRY_ENABLED__,
5151
release: __COMFYUI_FRONTEND_VERSION__,
52-
integrations: [],
53-
autoSessionTracking: false,
54-
defaultIntegrations: false,
5552
normalizeDepth: 8,
56-
tracesSampleRate: 0
53+
tracesSampleRate: isCloud ? 1.0 : 0,
54+
replaysSessionSampleRate: 0,
55+
replaysOnErrorSampleRate: 0,
56+
// Only set these for non-cloud builds
57+
...(isCloud
58+
? {}
59+
: {
60+
integrations: [],
61+
autoSessionTracking: false,
62+
defaultIntegrations: false
63+
})
5764
})
5865
app.directive('tooltip', Tooltip)
5966
app

0 commit comments

Comments
 (0)