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
|
groups
|
||||||
.getOrCreate(LabGroup.Analytics, [])
|
.getOrCreate(LabGroup.Analytics, [])
|
||||||
.push(
|
.push(
|
||||||
<SettingsFlag
|
|
||||||
key="automaticErrorReporting"
|
|
||||||
name="automaticErrorReporting"
|
|
||||||
level={SettingLevel.DEVICE}
|
|
||||||
/>,
|
|
||||||
<SettingsFlag
|
<SettingsFlag
|
||||||
key="automaticDecryptionErrorReporting"
|
key="automaticDecryptionErrorReporting"
|
||||||
name="automaticDecryptionErrorReporting"
|
name="automaticDecryptionErrorReporting"
|
||||||
|
|||||||
@@ -1495,7 +1495,6 @@
|
|||||||
},
|
},
|
||||||
"labs": {
|
"labs": {
|
||||||
"ask_to_join": "Enable ask to join",
|
"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",
|
"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_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",
|
"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 {
|
export function setSentryUser(mxid: string): void {
|
||||||
if (!SdkConfig.get().sentry || !SettingsStore.getValue("automaticErrorReporting")) return;
|
if (SdkConfig.get().sentry) {
|
||||||
Sentry.setUser({ username: mxid });
|
Sentry.setUser({ username: mxid });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function initSentry(sentryConfig: IConfigOptions["sentry"]): Promise<void> {
|
export async function initSentry(sentryConfig: IConfigOptions["sentry"]): Promise<void> {
|
||||||
if (!sentryConfig) return;
|
if (!sentryConfig) return;
|
||||||
// Only enable Integrations.GlobalHandlers, which hooks uncaught exceptions, if automaticErrorReporting is true
|
|
||||||
const integrations = [
|
const integrations = [
|
||||||
Sentry.inboundFiltersIntegration(),
|
Sentry.inboundFiltersIntegration(),
|
||||||
Sentry.functionToStringIntegration(),
|
Sentry.functionToStringIntegration(),
|
||||||
@@ -203,11 +203,6 @@ export async function initSentry(sentryConfig: IConfigOptions["sentry"]): Promis
|
|||||||
Sentry.dedupeIntegration(),
|
Sentry.dedupeIntegration(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (SettingsStore.getValue("automaticErrorReporting")) {
|
|
||||||
integrations.push(Sentry.globalHandlersIntegration({ onerror: false, onunhandledrejection: true }));
|
|
||||||
integrations.push(Sentry.browserApiErrorsIntegration());
|
|
||||||
}
|
|
||||||
|
|
||||||
Sentry.init({
|
Sentry.init({
|
||||||
dsn: sentryConfig.dsn,
|
dsn: sentryConfig.dsn,
|
||||||
release: process.env.VERSION,
|
release: process.env.VERSION,
|
||||||
|
|||||||
@@ -348,7 +348,6 @@ export interface Settings {
|
|||||||
"Spaces.enabledMetaSpaces": IBaseSetting<Partial<Record<MetaSpace, boolean>>>;
|
"Spaces.enabledMetaSpaces": IBaseSetting<Partial<Record<MetaSpace, boolean>>>;
|
||||||
"Spaces.showPeopleInSpace": IBaseSetting<boolean>;
|
"Spaces.showPeopleInSpace": IBaseSetting<boolean>;
|
||||||
"developerMode": IBaseSetting<boolean>;
|
"developerMode": IBaseSetting<boolean>;
|
||||||
"automaticErrorReporting": IBaseSetting<boolean>;
|
|
||||||
"automaticDecryptionErrorReporting": IBaseSetting<boolean>;
|
"automaticDecryptionErrorReporting": IBaseSetting<boolean>;
|
||||||
"debug_scroll_panel": IBaseSetting<boolean>;
|
"debug_scroll_panel": IBaseSetting<boolean>;
|
||||||
"debug_timeline_panel": IBaseSetting<boolean>;
|
"debug_timeline_panel": IBaseSetting<boolean>;
|
||||||
@@ -1308,12 +1307,6 @@ export const SETTINGS: Settings = {
|
|||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
"automaticErrorReporting": {
|
|
||||||
displayName: _td("labs|automatic_debug_logs"),
|
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
|
||||||
default: false,
|
|
||||||
controller: new ReloadOnChangeController(),
|
|
||||||
},
|
|
||||||
"automaticDecryptionErrorReporting": {
|
"automaticDecryptionErrorReporting": {
|
||||||
displayName: _td("labs|automatic_debug_logs_decryption"),
|
displayName: _td("labs|automatic_debug_logs_decryption"),
|
||||||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
||||||
|
|||||||
Reference in New Issue
Block a user