Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit588ce2a

Browse files
committed
Upgrade sentry in JS, integrate with react and redux
1 parent54fa0eb commit588ce2a

File tree

3 files changed

+56
-47
lines changed

3 files changed

+56
-47
lines changed

‎frontend/package-lock.json‎

Lines changed: 44 additions & 36 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎frontend/package.json‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"@fortawesome/fontawesome-svg-core":"^1.2.35",
1313
"@fortawesome/free-solid-svg-icons":"^5.15.3",
1414
"@fortawesome/react-fontawesome":"^0.1.14",
15-
"@sentry/browser":"^5.30.0",
15+
"@sentry/react":"^6.7.2",
1616
"ansi_up":"^5.0.0",
1717
"axios":"^0.21.1",
1818
"comlink":"^4.3.0",
@@ -34,7 +34,6 @@
3434
"reactjs-popup":"^1.5.0",
3535
"redux":"^4.0.5",
3636
"redux-logger":"^3.0.6",
37-
"redux-sentry-middleware":"^0.1.8",
3837
"redux-thunk":"^2.3.0",
3938
"sass":"^1.32.8"
4039
},

‎frontend/src/store.js‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@ import {
99
}from"./frontendlib";
1010
import{bookReducer,navigate}from"./book/store";
1111

12-
importcreateSentryMiddlewarefrom"redux-sentry-middleware";
13-
import*asSentryfrom"@sentry/browser";
12+
import*asSentryfrom"@sentry/react";
1413

1514
constsentryDsn=process.env.REACT_APP_SENTRY_DSN;
1615
if(sentryDsn){
1716
console.log('Configuring sentry');
18-
Sentry.init({dsn:sentryDsn});
17+
Sentry.init({dsn:sentryDsn,normalizeDepth:5});
1918
}
2019

21-
const{delegateReducer, stateSet}=redact("root");
20+
const{delegateReducer}=redact("root");
2221

2322
TextContainer.connect=connect;
2423

@@ -31,13 +30,16 @@ const reducer = delegateReducer(
3130
// noinspection JSUnresolvedVariable
3231
constcomposeEnhancers=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||compose;
3332

33+
constsentryReduxEnhancer=Sentry.createReduxEnhancer({});
34+
3435
exportconststore=createStore(
3536
reducer,
36-
composeEnhancers(applyMiddleware(
37-
thunk,
38-
logger,
39-
createSentryMiddleware(Sentry),
40-
))
37+
composeEnhancers(
38+
applyMiddleware(
39+
thunk,
40+
logger,
41+
),
42+
sentryReduxEnhancer)
4143
);
4244

4345
dispatcher.store=store;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp