Skip to content
Closed
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
1 change: 1 addition & 0 deletions spx-gui/src/apps/account/.env
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ VITE_AVATAR_BASE_URL=""
VITE_SENTRY_DSN=""
VITE_SENTRY_TRACES_SAMPLE_RATE="0.8"
VITE_SENTRY_LSP_SAMPLE_RATE="0.1"
VITE_SENTRY_AI_SAMPLE_RATE="1"

# Default language for app account, e.g. `en`, `zh`.
VITE_DEFAULT_LANG="en"
4 changes: 3 additions & 1 deletion spx-gui/src/apps/account/env.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
export const defaultLang = (import.meta.env.VITE_DEFAULT_LANG as string) || 'en'
const sentryTracesSampleRate = parseFloat(import.meta.env.VITE_SENTRY_TRACES_SAMPLE_RATE as string)
const sentryLSPSampleRate = parseFloat(import.meta.env.VITE_SENTRY_LSP_SAMPLE_RATE as string)
const sentryAISampleRate = parseFloat(import.meta.env.VITE_SENTRY_AI_SAMPLE_RATE as string)
export const sentry = {
dsn: (import.meta.env.VITE_SENTRY_DSN as string) || '',
tracesSampleRate: Number.isNaN(sentryTracesSampleRate) ? 0.1 : sentryTracesSampleRate,
lspSampleRate: Number.isNaN(sentryLSPSampleRate) ? 0.1 : sentryLSPSampleRate
lspSampleRate: Number.isNaN(sentryLSPSampleRate) ? 0.1 : sentryLSPSampleRate,
aiSampleRate: Number.isNaN(sentryAISampleRate) ? 1 : sentryAISampleRate
}
4 changes: 4 additions & 0 deletions spx-gui/src/apps/xbuilder/.env
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ VITE_SENTRY_TRACES_SAMPLE_RATE="0.8"
# 0.0 means no LSP events are sent, 1.0 means all LSP events are sent.
VITE_SENTRY_LSP_SAMPLE_RATE="0.1"

# Sampling rate for independent AI traces (ai.think and later ai.* roots).
# Kept separate from pageload so Think is not all-or-none with the page.
VITE_SENTRY_AI_SAMPLE_RATE="1"

# If tutorials entry should be shown in the Navbar.
VITE_SHOW_TUTORIALS_ENTRY="false"

Expand Down
4 changes: 3 additions & 1 deletion spx-gui/src/apps/xbuilder/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ export const defaultFontPreferences = (import.meta.env.VITE_DEFAULT_FONT_PREFERE
export const accountOAuthClientId = import.meta.env.VITE_ACCOUNT_OAUTH_CLIENT_ID as string
const sentryTracesSampleRate = parseFloat(import.meta.env.VITE_SENTRY_TRACES_SAMPLE_RATE as string)
const sentryLSPSampleRate = parseFloat(import.meta.env.VITE_SENTRY_LSP_SAMPLE_RATE as string)
const sentryAISampleRate = parseFloat(import.meta.env.VITE_SENTRY_AI_SAMPLE_RATE as string)
export const sentry = {
dsn: (import.meta.env.VITE_SENTRY_DSN as string) || '',
tracesSampleRate: Number.isNaN(sentryTracesSampleRate) ? 0.1 : sentryTracesSampleRate,
lspSampleRate: Number.isNaN(sentryLSPSampleRate) ? 0.1 : sentryLSPSampleRate
lspSampleRate: Number.isNaN(sentryLSPSampleRate) ? 0.1 : sentryLSPSampleRate,
aiSampleRate: Number.isNaN(sentryAISampleRate) ? 1 : sentryAISampleRate
}
Loading