Remove automaticErrorReporting labs feature (#32781)

* Disable changing automaticErrorReporting unless sentry is configured.

* Ensure we reload on change

* Remove automaticErrorReporting labs flag

* remove stray import

* I thought I had killed you

* poke ci
This commit is contained in:
Will Hunt
2026-03-13 11:29:19 +00:00
committed by GitHub
parent 635b0e6fe2
commit a73335168d
4 changed files with 3 additions and 21 deletions
@@ -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"
-1
View File
@@ -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",
+3 -8
View File
@@ -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(),
@@ -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,
-7
View File
@@ -348,7 +348,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>;
@@ -1308,12 +1307,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,