Adjusting Sentry integration to include extra info
This commit is contained in:
parent
abe7879b08
commit
d8ceec1c07
@ -37,7 +37,10 @@ class App extends React.PureComponent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
Sentry.captureException(e, { syntax });
|
Sentry.withScope(scope => {
|
||||||
|
scope.setExtra('syntax', syntax);
|
||||||
|
Sentry.captureException(e);
|
||||||
|
});
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: false,
|
loading: false,
|
||||||
loadingError: e
|
loadingError: e
|
||||||
|
@ -14,7 +14,11 @@ class SentryBoundary extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
componentDidCatch(error, errorInfo) {
|
componentDidCatch(error, errorInfo) {
|
||||||
Sentry.captureException(error, errorInfo);
|
Sentry.withScope(scope => {
|
||||||
|
Object.keys(errorInfo).forEach(key =>
|
||||||
|
scope.setExtra(key, errorInfo[key]));
|
||||||
|
Sentry.captureException(error);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
Loading…
Reference in New Issue
Block a user