Merge pull request #3535 from matrix-org/jryans/tag-react-soft-crashes

Add label to rageshakes for React soft crashes
This commit is contained in:
J. Ryan Stinnett 2019-10-09 12:38:42 +01:00 committed by GitHub
commit 93ff43f7e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -2,6 +2,7 @@
Copyright 2017 OpenMarket Ltd Copyright 2017 OpenMarket Ltd
Copyright 2018 New Vector Ltd Copyright 2018 New Vector Ltd
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com> Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -71,6 +72,7 @@ export default class BugReportDialog extends React.Component {
userText, userText,
sendLogs: true, sendLogs: true,
progressCallback: this._sendProgressCallback, progressCallback: this._sendProgressCallback,
label: this.props.label,
}).then(() => { }).then(() => {
if (!this._unmounted) { if (!this._unmounted) {
this.props.onFinished(false); this.props.onFinished(false);

View file

@ -64,7 +64,9 @@ export default class ErrorBoundary extends React.PureComponent {
if (!BugReportDialog) { if (!BugReportDialog) {
return; return;
} }
Modal.createTrackedDialog('Bug Report Dialog', '', BugReportDialog, {}); Modal.createTrackedDialog('Bug Report Dialog', '', BugReportDialog, {
label: 'react-soft-crash',
});
}; };
render() { render() {

View file

@ -1,6 +1,7 @@
/* /*
Copyright 2017 OpenMarket Ltd Copyright 2017 OpenMarket Ltd
Copyright 2018 New Vector Ltd Copyright 2018 New Vector Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
@ -81,6 +82,10 @@ export default async function sendBugReport(bugReportEndpoint, opts) {
body.append('device_id', client.deviceId); body.append('device_id', client.deviceId);
} }
if (opts.label) {
body.append('label', opts.label);
}
if (opts.sendLogs) { if (opts.sendLogs) {
progressCallback(_t("Collecting logs")); progressCallback(_t("Collecting logs"));
const logs = await rageshake.getLogsForReport(); const logs = await rageshake.getLogsForReport();