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
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ export default class LabsUserSettingsTab extends React.Component<EmptyObject> {
groups
.getOrCreate(LabGroup.Analytics, [])
.push(
<SettingsFlag
key="automaticErrorReporting"
name="automaticErrorReporting"
level={SettingLevel.DEVICE}
/>,
<SettingsFlag
key="automaticDecryptionErrorReporting"
name="automaticDecryptionErrorReporting"
Expand Down
1 change: 0 additions & 1 deletion apps/web/src/i18n/strings/en_EN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1495,7 +1495,6 @@
},
"labs": {
"ask_to_join": "Enable ask to join",
"automatic_debug_logs": "Automatically send debug logs on any error",
"automatic_debug_logs_decryption": "Automatically send debug logs on decryption errors",
"beta_description": "What's next for %(brand)s? Labs are the best way to get things early, test out new features and help shape them before they actually launch.",
"beta_feature": "This is a beta feature",
Expand Down
11 changes: 3 additions & 8 deletions apps/web/src/sentry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ export async function sendSentryReport(userText: string, issueUrl: string, error
}

export function setSentryUser(mxid: string): void {
if (!SdkConfig.get().sentry || !SettingsStore.getValue("automaticErrorReporting")) return;
Sentry.setUser({ username: mxid });
if (SdkConfig.get().sentry) {
Sentry.setUser({ username: mxid });
}
}

export async function initSentry(sentryConfig: IConfigOptions["sentry"]): Promise<void> {
if (!sentryConfig) return;
// Only enable Integrations.GlobalHandlers, which hooks uncaught exceptions, if automaticErrorReporting is true
const integrations = [
Sentry.inboundFiltersIntegration(),
Sentry.functionToStringIntegration(),
Expand All @@ -203,11 +203,6 @@ export async function initSentry(sentryConfig: IConfigOptions["sentry"]): Promis
Sentry.dedupeIntegration(),
];

if (SettingsStore.getValue("automaticErrorReporting")) {
integrations.push(Sentry.globalHandlersIntegration({ onerror: false, onunhandledrejection: true }));
integrations.push(Sentry.browserApiErrorsIntegration());
}

Sentry.init({
dsn: sentryConfig.dsn,
release: process.env.VERSION,
Expand Down
7 changes: 0 additions & 7 deletions apps/web/src/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ export interface Settings {
"Spaces.enabledMetaSpaces": IBaseSetting<Partial<Record<MetaSpace, boolean>>>;
"Spaces.showPeopleInSpace": IBaseSetting<boolean>;
"developerMode": IBaseSetting<boolean>;
"automaticErrorReporting": IBaseSetting<boolean>;
"automaticDecryptionErrorReporting": IBaseSetting<boolean>;
"debug_scroll_panel": IBaseSetting<boolean>;
"debug_timeline_panel": IBaseSetting<boolean>;
Expand Down Expand Up @@ -1310,12 +1309,6 @@ export const SETTINGS: Settings = {
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
default: false,
},
"automaticErrorReporting": {
displayName: _td("labs|automatic_debug_logs"),
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
default: false,
controller: new ReloadOnChangeController(),
},
"automaticDecryptionErrorReporting": {
displayName: _td("labs|automatic_debug_logs_decryption"),
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
Expand Down
Loading