@commercetools-frontend/sentry 21.19.0 → 21.20.1

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.
@@ -6,7 +6,9 @@ var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/string
6
6
  var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
7
7
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
8
8
  var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
9
- var Sentry = require('@sentry/browser');
9
+ var Sentry = require('@sentry/react');
10
+ var tracing = require('@sentry/tracing');
11
+ var history = require('@commercetools-frontend/browser-history');
10
12
  var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
11
13
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
12
14
  var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
@@ -41,11 +43,12 @@ var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesI
41
43
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
42
44
  var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
43
45
  var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
46
+ var history__default = /*#__PURE__*/_interopDefault(history);
44
47
  var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
45
48
  var _pt__default = /*#__PURE__*/_interopDefault(_pt);
46
49
 
47
50
  // NOTE: This string will be replaced on build time with the package version.
48
- var version = "21.19.0";
51
+ var version = "21.20.1";
49
52
 
50
53
  var makeErrorToCapture = function makeErrorToCapture(error) {
51
54
  if (error instanceof Error) return error;
@@ -116,7 +119,15 @@ var boot = function boot() {
116
119
  integrations: [new Sentry__namespace.Integrations.GlobalHandlers({
117
120
  onunhandledrejection: false,
118
121
  onerror: false
122
+ }), new tracing.BrowserTracing({
123
+ routingInstrumentation: Sentry__namespace.reactRouterV5Instrumentation(history__default["default"])
119
124
  })],
125
+ // Sending 20% of transactions. We can adjust that as we see a need to.
126
+ // Generally we need to find a balance between performance and data volume.
127
+ // If we need more flexible and dynamic way of gathering important samples,
128
+ // we can implement the `tracesSampler` function.
129
+ // https://docs.sentry.io/platforms/javascript/guides/react/configuration/sampling/#sampling-transaction-events
130
+ tracesSampleRate: 0.2,
120
131
  beforeSend: function beforeSend(event) {
121
132
  return redactUnsafeEventFields(event);
122
133
  }
@@ -6,7 +6,9 @@ var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/string
6
6
  var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
7
7
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
8
8
  var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
9
- var Sentry = require('@sentry/browser');
9
+ var Sentry = require('@sentry/react');
10
+ var tracing = require('@sentry/tracing');
11
+ var history = require('@commercetools-frontend/browser-history');
10
12
  var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
11
13
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
12
14
  var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
@@ -41,10 +43,11 @@ var _includesInstanceProperty__default = /*#__PURE__*/_interopDefault(_includesI
41
43
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
42
44
  var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
43
45
  var Sentry__namespace = /*#__PURE__*/_interopNamespace(Sentry);
46
+ var history__default = /*#__PURE__*/_interopDefault(history);
44
47
  var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
45
48
 
46
49
  // NOTE: This string will be replaced on build time with the package version.
47
- var version = "21.19.0";
50
+ var version = "21.20.1";
48
51
 
49
52
  var makeErrorToCapture = function makeErrorToCapture(error) {
50
53
  if (error instanceof Error) return error;
@@ -115,7 +118,15 @@ var boot = function boot() {
115
118
  integrations: [new Sentry__namespace.Integrations.GlobalHandlers({
116
119
  onunhandledrejection: false,
117
120
  onerror: false
121
+ }), new tracing.BrowserTracing({
122
+ routingInstrumentation: Sentry__namespace.reactRouterV5Instrumentation(history__default["default"])
118
123
  })],
124
+ // Sending 20% of transactions. We can adjust that as we see a need to.
125
+ // Generally we need to find a balance between performance and data volume.
126
+ // If we need more flexible and dynamic way of gathering important samples,
127
+ // we can implement the `tracesSampler` function.
128
+ // https://docs.sentry.io/platforms/javascript/guides/react/configuration/sampling/#sampling-transaction-events
129
+ tracesSampleRate: 0.2,
119
130
  beforeSend: function beforeSend(event) {
120
131
  return redactUnsafeEventFields(event);
121
132
  }
@@ -2,7 +2,9 @@ import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringif
2
2
  import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
3
3
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
4
4
  import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
5
- import * as Sentry from '@sentry/browser';
5
+ import * as Sentry from '@sentry/react';
6
+ import { BrowserTracing } from '@sentry/tracing';
7
+ import history from '@commercetools-frontend/browser-history';
6
8
  import _Reflect$construct from '@babel/runtime-corejs3/core-js-stable/reflect/construct';
7
9
  import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
8
10
  import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
@@ -13,7 +15,7 @@ import _pt from 'prop-types';
13
15
  import { PureComponent, Component } from 'react';
14
16
 
15
17
  // NOTE: This string will be replaced on build time with the package version.
16
- var version = "21.19.0";
18
+ var version = "21.20.1";
17
19
 
18
20
  var makeErrorToCapture = function makeErrorToCapture(error) {
19
21
  if (error instanceof Error) return error;
@@ -84,7 +86,15 @@ var boot = function boot() {
84
86
  integrations: [new Sentry.Integrations.GlobalHandlers({
85
87
  onunhandledrejection: false,
86
88
  onerror: false
89
+ }), new BrowserTracing({
90
+ routingInstrumentation: Sentry.reactRouterV5Instrumentation(history)
87
91
  })],
92
+ // Sending 20% of transactions. We can adjust that as we see a need to.
93
+ // Generally we need to find a balance between performance and data volume.
94
+ // If we need more flexible and dynamic way of gathering important samples,
95
+ // we can implement the `tracesSampler` function.
96
+ // https://docs.sentry.io/platforms/javascript/guides/react/configuration/sampling/#sampling-transaction-events
97
+ tracesSampleRate: 0.2,
88
98
  beforeSend: function beforeSend(event) {
89
99
  return redactUnsafeEventFields(event);
90
100
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/sentry",
3
- "version": "21.19.0",
3
+ "version": "21.20.1",
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,15 +20,17 @@
20
20
  "dependencies": {
21
21
  "@babel/runtime": "^7.19.0",
22
22
  "@babel/runtime-corejs3": "^7.19.0",
23
- "@commercetools-frontend/constants": "21.19.0",
24
- "@sentry/browser": "7.14.0",
23
+ "@commercetools-frontend/browser-history": "21.20.1",
24
+ "@commercetools-frontend/constants": "21.20.1",
25
+ "@sentry/react": "7.19.0",
26
+ "@sentry/tracing": "7.19.0",
25
27
  "@types/prop-types": "^15.7.5",
26
28
  "@types/react": "^17.0.49",
27
29
  "prop-types": "15.8.1"
28
30
  },
29
31
  "devDependencies": {
30
32
  "react": "17.0.2",
31
- "sentry-testkit": "4.1.0",
33
+ "sentry-testkit": "5.0.3",
32
34
  "wait-for-expect": "3.0.2"
33
35
  },
34
36
  "peerDependencies": {