@commercetools-frontend/sentry 21.23.9 → 21.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -48,30 +48,30 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
|
|
|
48
48
|
var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
49
49
|
|
|
50
50
|
// NOTE: This string will be replaced on build time with the package version.
|
|
51
|
-
var version = "21.
|
|
51
|
+
var version = "21.24.0";
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
const makeErrorToCapture = error => {
|
|
54
54
|
if (error instanceof Error) return error;
|
|
55
55
|
if (error instanceof ErrorEvent) return new Error(error.message);
|
|
56
56
|
return new Error(_JSON$stringify__default["default"](error.reason || 'Unhandled rejection without a reason'));
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
const sendErrorToSentry = error => {
|
|
60
60
|
if (typeof error === 'string') return Sentry__namespace.captureMessage(error);
|
|
61
|
-
|
|
61
|
+
const errorToCapture = makeErrorToCapture(error);
|
|
62
62
|
return Sentry__namespace.captureException(errorToCapture);
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
const replaceEventValues = (source, replacements) => {
|
|
66
|
+
const replaceEventValue = prop => {
|
|
67
67
|
source[prop] = replacements[prop];
|
|
68
68
|
};
|
|
69
69
|
|
|
70
|
-
for (
|
|
70
|
+
for (const prop in source) {
|
|
71
71
|
if (Object.prototype.hasOwnProperty.call(source, prop)) {
|
|
72
72
|
var _context;
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
const hasPropReplacement = _includesInstanceProperty__default["default"](_context = _Object$keys__default["default"](replacements)).call(_context, prop);
|
|
75
75
|
|
|
76
76
|
switch (typeof source[prop]) {
|
|
77
77
|
case 'string':
|
|
@@ -96,14 +96,14 @@ var replaceEventValues = function replaceEventValues(source, replacements) {
|
|
|
96
96
|
return source;
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
|
|
99
|
+
const redactUnsafeEventFields = event => {
|
|
100
100
|
return replaceEventValues(event, {
|
|
101
101
|
firstName: '[Redacted]',
|
|
102
102
|
lastName: '[Redacted]',
|
|
103
103
|
email: '[Redacted]'
|
|
104
104
|
});
|
|
105
105
|
};
|
|
106
|
-
|
|
106
|
+
const boot = () => {
|
|
107
107
|
if (window.app.trackingSentry && window.app.trackingSentry !== 'null') {
|
|
108
108
|
var _context2;
|
|
109
109
|
|
|
@@ -127,22 +127,22 @@ var boot = function boot() {
|
|
|
127
127
|
// we can implement the `tracesSampler` function.
|
|
128
128
|
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/sampling/#sampling-transaction-events
|
|
129
129
|
tracesSampleRate: 0.05,
|
|
130
|
-
|
|
130
|
+
|
|
131
|
+
beforeSend(event) {
|
|
131
132
|
return redactUnsafeEventFields(event);
|
|
132
133
|
}
|
|
134
|
+
|
|
133
135
|
});
|
|
134
|
-
Sentry__namespace.configureScope(
|
|
136
|
+
Sentry__namespace.configureScope(scope => {
|
|
135
137
|
scope.setTag('role', 'frontend');
|
|
136
138
|
});
|
|
137
139
|
}
|
|
138
140
|
};
|
|
139
141
|
|
|
140
|
-
|
|
141
|
-
return typeof extrasOrExtra === 'object';
|
|
142
|
-
};
|
|
142
|
+
const isExtraAsObject = extrasOrExtra => typeof extrasOrExtra === 'object';
|
|
143
143
|
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
|
|
145
|
+
const isEnabled = getIsEnabled ? getIsEnabled() : Boolean(window.app.trackingSentry);
|
|
146
146
|
|
|
147
147
|
if (typeof error === 'string' && !isEnabled) {
|
|
148
148
|
console.warn('[SENTRY]: You called "reportErrorToSentry" with a string argument. ' + '"Error" objects should be preferred so that a stack-trace can be made available in Sentry. ' + 'See: https://docs.sentry.io/clients/javascript/usage/#try-catch');
|
|
@@ -159,7 +159,7 @@ var reportErrorToSentry = function reportErrorToSentry(error, extraInfo, getIsEn
|
|
|
159
159
|
} // Generate a unique ID referring to the last generated Sentry error
|
|
160
160
|
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
const errorId = sendErrorToSentry(error); // The error stack should be available in Sentry, so there is no
|
|
163
163
|
// need to print it in the console as well.
|
|
164
164
|
// We just notify that an error occurred and provide the error ID.
|
|
165
165
|
|
|
@@ -179,14 +179,12 @@ function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !
|
|
|
179
179
|
* This component will let sentry know if any information about the user has
|
|
180
180
|
* changed.
|
|
181
181
|
*/
|
|
182
|
-
|
|
182
|
+
let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
183
183
|
_inherits(SentryUserTracker, _PureComponent);
|
|
184
184
|
|
|
185
185
|
var _super = _createSuper$1(SentryUserTracker);
|
|
186
186
|
|
|
187
187
|
function SentryUserTracker() {
|
|
188
|
-
var _context;
|
|
189
|
-
|
|
190
188
|
var _this;
|
|
191
189
|
|
|
192
190
|
_classCallCheck(this, SentryUserTracker);
|
|
@@ -195,13 +193,13 @@ var SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
195
193
|
args[_key] = arguments[_key];
|
|
196
194
|
}
|
|
197
195
|
|
|
198
|
-
_this = _super.call
|
|
196
|
+
_this = _super.call(this, ...args);
|
|
199
197
|
|
|
200
|
-
_this.syncUser =
|
|
198
|
+
_this.syncUser = () => {
|
|
201
199
|
if (_this.props.user && window.app.trackingSentry) {
|
|
202
200
|
// to avoid sending personal data to sentry we anonymize the email address
|
|
203
201
|
// by only sending the domain part or the email
|
|
204
|
-
|
|
202
|
+
const emailTld = _this.props.user.email.split('@')[1];
|
|
205
203
|
|
|
206
204
|
Sentry__namespace.setUser({
|
|
207
205
|
email: "xxx@".concat(emailTld),
|
|
@@ -247,7 +245,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
247
245
|
|
|
248
246
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
249
247
|
|
|
250
|
-
|
|
248
|
+
let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
251
249
|
_inherits(SentryUserLogoutTracker, _Component);
|
|
252
250
|
|
|
253
251
|
var _super = _createSuper(SentryUserLogoutTracker);
|
|
@@ -264,7 +262,7 @@ var SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
|
264
262
|
// When the user is not logged in anymore (e.g. on logout) we still track
|
|
265
263
|
// errors but without the user data in context.
|
|
266
264
|
if (window.app.trackingSentry) {
|
|
267
|
-
Sentry__namespace.configureScope(
|
|
265
|
+
Sentry__namespace.configureScope(scope => {
|
|
268
266
|
scope.clear();
|
|
269
267
|
});
|
|
270
268
|
}
|
|
@@ -47,30 +47,30 @@ var history__default = /*#__PURE__*/_interopDefault(history);
|
|
|
47
47
|
var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
|
|
48
48
|
|
|
49
49
|
// NOTE: This string will be replaced on build time with the package version.
|
|
50
|
-
var version = "21.
|
|
50
|
+
var version = "21.24.0";
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
const makeErrorToCapture = error => {
|
|
53
53
|
if (error instanceof Error) return error;
|
|
54
54
|
if (error instanceof ErrorEvent) return new Error(error.message);
|
|
55
55
|
return new Error(_JSON$stringify__default["default"](error.reason || 'Unhandled rejection without a reason'));
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
const sendErrorToSentry = error => {
|
|
59
59
|
if (typeof error === 'string') return Sentry__namespace.captureMessage(error);
|
|
60
|
-
|
|
60
|
+
const errorToCapture = makeErrorToCapture(error);
|
|
61
61
|
return Sentry__namespace.captureException(errorToCapture);
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
const replaceEventValues = (source, replacements) => {
|
|
65
|
+
const replaceEventValue = prop => {
|
|
66
66
|
source[prop] = replacements[prop];
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
for (
|
|
69
|
+
for (const prop in source) {
|
|
70
70
|
if (Object.prototype.hasOwnProperty.call(source, prop)) {
|
|
71
71
|
var _context;
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
const hasPropReplacement = _includesInstanceProperty__default["default"](_context = _Object$keys__default["default"](replacements)).call(_context, prop);
|
|
74
74
|
|
|
75
75
|
switch (typeof source[prop]) {
|
|
76
76
|
case 'string':
|
|
@@ -95,14 +95,14 @@ var replaceEventValues = function replaceEventValues(source, replacements) {
|
|
|
95
95
|
return source;
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
const redactUnsafeEventFields = event => {
|
|
99
99
|
return replaceEventValues(event, {
|
|
100
100
|
firstName: '[Redacted]',
|
|
101
101
|
lastName: '[Redacted]',
|
|
102
102
|
email: '[Redacted]'
|
|
103
103
|
});
|
|
104
104
|
};
|
|
105
|
-
|
|
105
|
+
const boot = () => {
|
|
106
106
|
if (window.app.trackingSentry && window.app.trackingSentry !== 'null') {
|
|
107
107
|
var _context2;
|
|
108
108
|
|
|
@@ -126,22 +126,22 @@ var boot = function boot() {
|
|
|
126
126
|
// we can implement the `tracesSampler` function.
|
|
127
127
|
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/sampling/#sampling-transaction-events
|
|
128
128
|
tracesSampleRate: 0.05,
|
|
129
|
-
|
|
129
|
+
|
|
130
|
+
beforeSend(event) {
|
|
130
131
|
return redactUnsafeEventFields(event);
|
|
131
132
|
}
|
|
133
|
+
|
|
132
134
|
});
|
|
133
|
-
Sentry__namespace.configureScope(
|
|
135
|
+
Sentry__namespace.configureScope(scope => {
|
|
134
136
|
scope.setTag('role', 'frontend');
|
|
135
137
|
});
|
|
136
138
|
}
|
|
137
139
|
};
|
|
138
140
|
|
|
139
|
-
|
|
140
|
-
return typeof extrasOrExtra === 'object';
|
|
141
|
-
};
|
|
141
|
+
const isExtraAsObject = extrasOrExtra => typeof extrasOrExtra === 'object';
|
|
142
142
|
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
|
|
144
|
+
const isEnabled = getIsEnabled ? getIsEnabled() : Boolean(window.app.trackingSentry);
|
|
145
145
|
|
|
146
146
|
if (typeof error === 'string' && !isEnabled) {
|
|
147
147
|
console.warn('[SENTRY]: You called "reportErrorToSentry" with a string argument. ' + '"Error" objects should be preferred so that a stack-trace can be made available in Sentry. ' + 'See: https://docs.sentry.io/clients/javascript/usage/#try-catch');
|
|
@@ -158,7 +158,7 @@ var reportErrorToSentry = function reportErrorToSentry(error, extraInfo, getIsEn
|
|
|
158
158
|
} // Generate a unique ID referring to the last generated Sentry error
|
|
159
159
|
|
|
160
160
|
|
|
161
|
-
|
|
161
|
+
const errorId = sendErrorToSentry(error); // The error stack should be available in Sentry, so there is no
|
|
162
162
|
// need to print it in the console as well.
|
|
163
163
|
// We just notify that an error occurred and provide the error ID.
|
|
164
164
|
|
|
@@ -178,14 +178,12 @@ function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !
|
|
|
178
178
|
* This component will let sentry know if any information about the user has
|
|
179
179
|
* changed.
|
|
180
180
|
*/
|
|
181
|
-
|
|
181
|
+
let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
182
182
|
_inherits(SentryUserTracker, _PureComponent);
|
|
183
183
|
|
|
184
184
|
var _super = _createSuper$1(SentryUserTracker);
|
|
185
185
|
|
|
186
186
|
function SentryUserTracker() {
|
|
187
|
-
var _context;
|
|
188
|
-
|
|
189
187
|
var _this;
|
|
190
188
|
|
|
191
189
|
_classCallCheck(this, SentryUserTracker);
|
|
@@ -194,13 +192,13 @@ var SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
194
192
|
args[_key] = arguments[_key];
|
|
195
193
|
}
|
|
196
194
|
|
|
197
|
-
_this = _super.call
|
|
195
|
+
_this = _super.call(this, ...args);
|
|
198
196
|
|
|
199
|
-
_this.syncUser =
|
|
197
|
+
_this.syncUser = () => {
|
|
200
198
|
if (_this.props.user && window.app.trackingSentry) {
|
|
201
199
|
// to avoid sending personal data to sentry we anonymize the email address
|
|
202
200
|
// by only sending the domain part or the email
|
|
203
|
-
|
|
201
|
+
const emailTld = _this.props.user.email.split('@')[1];
|
|
204
202
|
|
|
205
203
|
Sentry__namespace.setUser({
|
|
206
204
|
email: "xxx@".concat(emailTld),
|
|
@@ -241,7 +239,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
241
239
|
|
|
242
240
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct__default["default"]) return false; if (_Reflect$construct__default["default"].sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
243
241
|
|
|
244
|
-
|
|
242
|
+
let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
245
243
|
_inherits(SentryUserLogoutTracker, _Component);
|
|
246
244
|
|
|
247
245
|
var _super = _createSuper(SentryUserLogoutTracker);
|
|
@@ -258,7 +256,7 @@ var SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
|
258
256
|
// When the user is not logged in anymore (e.g. on logout) we still track
|
|
259
257
|
// errors but without the user data in context.
|
|
260
258
|
if (window.app.trackingSentry) {
|
|
261
|
-
Sentry__namespace.configureScope(
|
|
259
|
+
Sentry__namespace.configureScope(scope => {
|
|
262
260
|
scope.clear();
|
|
263
261
|
});
|
|
264
262
|
}
|
|
@@ -15,30 +15,30 @@ import _pt from 'prop-types';
|
|
|
15
15
|
import { PureComponent, Component } from 'react';
|
|
16
16
|
|
|
17
17
|
// NOTE: This string will be replaced on build time with the package version.
|
|
18
|
-
var version = "21.
|
|
18
|
+
var version = "21.24.0";
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
const makeErrorToCapture = error => {
|
|
21
21
|
if (error instanceof Error) return error;
|
|
22
22
|
if (error instanceof ErrorEvent) return new Error(error.message);
|
|
23
23
|
return new Error(_JSON$stringify(error.reason || 'Unhandled rejection without a reason'));
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
const sendErrorToSentry = error => {
|
|
27
27
|
if (typeof error === 'string') return Sentry.captureMessage(error);
|
|
28
|
-
|
|
28
|
+
const errorToCapture = makeErrorToCapture(error);
|
|
29
29
|
return Sentry.captureException(errorToCapture);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
const replaceEventValues = (source, replacements) => {
|
|
33
|
+
const replaceEventValue = prop => {
|
|
34
34
|
source[prop] = replacements[prop];
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
for (
|
|
37
|
+
for (const prop in source) {
|
|
38
38
|
if (Object.prototype.hasOwnProperty.call(source, prop)) {
|
|
39
39
|
var _context;
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
const hasPropReplacement = _includesInstanceProperty(_context = _Object$keys(replacements)).call(_context, prop);
|
|
42
42
|
|
|
43
43
|
switch (typeof source[prop]) {
|
|
44
44
|
case 'string':
|
|
@@ -63,14 +63,14 @@ var replaceEventValues = function replaceEventValues(source, replacements) {
|
|
|
63
63
|
return source;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
const redactUnsafeEventFields = event => {
|
|
67
67
|
return replaceEventValues(event, {
|
|
68
68
|
firstName: '[Redacted]',
|
|
69
69
|
lastName: '[Redacted]',
|
|
70
70
|
email: '[Redacted]'
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
const boot = () => {
|
|
74
74
|
if (window.app.trackingSentry && window.app.trackingSentry !== 'null') {
|
|
75
75
|
var _context2;
|
|
76
76
|
|
|
@@ -94,22 +94,22 @@ var boot = function boot() {
|
|
|
94
94
|
// we can implement the `tracesSampler` function.
|
|
95
95
|
// https://docs.sentry.io/platforms/javascript/guides/react/configuration/sampling/#sampling-transaction-events
|
|
96
96
|
tracesSampleRate: 0.05,
|
|
97
|
-
|
|
97
|
+
|
|
98
|
+
beforeSend(event) {
|
|
98
99
|
return redactUnsafeEventFields(event);
|
|
99
100
|
}
|
|
101
|
+
|
|
100
102
|
});
|
|
101
|
-
Sentry.configureScope(
|
|
103
|
+
Sentry.configureScope(scope => {
|
|
102
104
|
scope.setTag('role', 'frontend');
|
|
103
105
|
});
|
|
104
106
|
}
|
|
105
107
|
};
|
|
106
108
|
|
|
107
|
-
|
|
108
|
-
return typeof extrasOrExtra === 'object';
|
|
109
|
-
};
|
|
109
|
+
const isExtraAsObject = extrasOrExtra => typeof extrasOrExtra === 'object';
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
const reportErrorToSentry = (error, extraInfo, getIsEnabled) => {
|
|
112
|
+
const isEnabled = getIsEnabled ? getIsEnabled() : Boolean(window.app.trackingSentry);
|
|
113
113
|
|
|
114
114
|
if (typeof error === 'string' && !isEnabled) {
|
|
115
115
|
console.warn('[SENTRY]: You called "reportErrorToSentry" with a string argument. ' + '"Error" objects should be preferred so that a stack-trace can be made available in Sentry. ' + 'See: https://docs.sentry.io/clients/javascript/usage/#try-catch');
|
|
@@ -126,7 +126,7 @@ var reportErrorToSentry = function reportErrorToSentry(error, extraInfo, getIsEn
|
|
|
126
126
|
} // Generate a unique ID referring to the last generated Sentry error
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
const errorId = sendErrorToSentry(error); // The error stack should be available in Sentry, so there is no
|
|
130
130
|
// need to print it in the console as well.
|
|
131
131
|
// We just notify that an error occurred and provide the error ID.
|
|
132
132
|
|
|
@@ -146,14 +146,12 @@ function _isNativeReflectConstruct$1() { if (typeof Reflect === "undefined" || !
|
|
|
146
146
|
* This component will let sentry know if any information about the user has
|
|
147
147
|
* changed.
|
|
148
148
|
*/
|
|
149
|
-
|
|
149
|
+
let SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
150
150
|
_inherits(SentryUserTracker, _PureComponent);
|
|
151
151
|
|
|
152
152
|
var _super = _createSuper$1(SentryUserTracker);
|
|
153
153
|
|
|
154
154
|
function SentryUserTracker() {
|
|
155
|
-
var _context;
|
|
156
|
-
|
|
157
155
|
var _this;
|
|
158
156
|
|
|
159
157
|
_classCallCheck(this, SentryUserTracker);
|
|
@@ -162,13 +160,13 @@ var SentryUserTracker = /*#__PURE__*/function (_PureComponent) {
|
|
|
162
160
|
args[_key] = arguments[_key];
|
|
163
161
|
}
|
|
164
162
|
|
|
165
|
-
_this = _super.call
|
|
163
|
+
_this = _super.call(this, ...args);
|
|
166
164
|
|
|
167
|
-
_this.syncUser =
|
|
165
|
+
_this.syncUser = () => {
|
|
168
166
|
if (_this.props.user && window.app.trackingSentry) {
|
|
169
167
|
// to avoid sending personal data to sentry we anonymize the email address
|
|
170
168
|
// by only sending the domain part or the email
|
|
171
|
-
|
|
169
|
+
const emailTld = _this.props.user.email.split('@')[1];
|
|
172
170
|
|
|
173
171
|
Sentry.setUser({
|
|
174
172
|
email: "xxx@".concat(emailTld),
|
|
@@ -214,7 +212,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
214
212
|
|
|
215
213
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
216
214
|
|
|
217
|
-
|
|
215
|
+
let SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
218
216
|
_inherits(SentryUserLogoutTracker, _Component);
|
|
219
217
|
|
|
220
218
|
var _super = _createSuper(SentryUserLogoutTracker);
|
|
@@ -231,7 +229,7 @@ var SentryUserLogoutTracker = /*#__PURE__*/function (_Component) {
|
|
|
231
229
|
// When the user is not logged in anymore (e.g. on logout) we still track
|
|
232
230
|
// errors but without the user data in context.
|
|
233
231
|
if (window.app.trackingSentry) {
|
|
234
|
-
Sentry.configureScope(
|
|
232
|
+
Sentry.configureScope(scope => {
|
|
235
233
|
scope.clear();
|
|
236
234
|
});
|
|
237
235
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as Sentry from '@sentry/react';
|
|
1
2
|
import type { Extra, Extras, Event } from '@sentry/types';
|
|
2
3
|
type ReportableEvent = ErrorEvent | PromiseRejectionEvent;
|
|
3
4
|
type Reportable = Error | ReportableEvent | string;
|
|
4
|
-
export declare const redactUnsafeEventFields: (event: Event) => Event;
|
|
5
|
+
export declare const redactUnsafeEventFields: (event: Event) => Sentry.Event;
|
|
5
6
|
export declare const boot: () => void;
|
|
6
7
|
export declare const reportErrorToSentry: (error: Reportable, extraInfo?: {
|
|
7
8
|
extra?: Extra | Extras;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/sentry",
|
|
3
|
-
"version": "21.
|
|
3
|
+
"version": "21.24.0",
|
|
4
4
|
"description": "Components to set up Sentry for a MC application",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@babel/runtime": "^7.20.13",
|
|
22
22
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
23
|
-
"@commercetools-frontend/browser-history": "21.
|
|
24
|
-
"@commercetools-frontend/constants": "21.
|
|
25
|
-
"@sentry/react": "7.
|
|
26
|
-
"@sentry/tracing": "7.
|
|
23
|
+
"@commercetools-frontend/browser-history": "21.24.0",
|
|
24
|
+
"@commercetools-frontend/constants": "21.24.0",
|
|
25
|
+
"@sentry/react": "7.43.0",
|
|
26
|
+
"@sentry/tracing": "7.43.0",
|
|
27
27
|
"@types/prop-types": "^15.7.5",
|
|
28
28
|
"@types/react": "^17.0.53",
|
|
29
29
|
"prop-types": "15.8.1"
|