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:
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user