@commercetools-frontend/sentry 23.0.0 → 23.2.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.
@@ -46,7 +46,7 @@ var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construc
46
46
  var _pt__default = /*#__PURE__*/_interopDefault(_pt);
47
47
 
48
48
  // NOTE: This string will be replaced on build time with the package version.
49
- var version = "23.0.0";
49
+ var version = "23.2.0";
50
50
 
51
51
  const makeErrorToCapture = error => {
52
52
  if (error instanceof Error) return error;
@@ -104,11 +104,11 @@ const boot = () => {
104
104
  // suppress any resize observer errors, see
105
105
  // https://github.com/vercel/next.js/discussions/51551
106
106
  ignoreErrors: [/ResizeObserver loop (limit exceeded|completed with undelivered notifications)/i],
107
- integrations: [new Sentry__namespace.Integrations.GlobalHandlers({
107
+ integrations: [browser.globalHandlersIntegration({
108
108
  onunhandledrejection: false,
109
109
  onerror: false
110
- }), new browser.BrowserTracing({
111
- routingInstrumentation: Sentry__namespace.reactRouterV5Instrumentation(history__default["default"])
110
+ }), Sentry__namespace.reactRouterV5BrowserTracingIntegration({
111
+ history: history__default["default"]
112
112
  })],
113
113
  // Sending 5% of transactions. We can adjust that as we see a need to.
114
114
  // Generally we need to find a balance between performance and data volume.
@@ -120,9 +120,9 @@ const boot = () => {
120
120
  return redactUnsafeEventFields(event);
121
121
  }
122
122
  });
123
- Sentry__namespace.configureScope(scope => {
124
- scope.setTag('role', 'frontend');
125
- });
123
+ const sentryScope = Sentry__namespace.getCurrentScope();
124
+ sentryScope.setTag('role', 'frontend');
125
+ sentryScope.setTag('applicationName', window.app.applicationName);
126
126
  }
127
127
  };
128
128
  const isExtraAsObject = extrasOrExtra => typeof extrasOrExtra === 'object';
@@ -45,7 +45,7 @@ var history__default = /*#__PURE__*/_interopDefault(history);
45
45
  var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
46
46
 
47
47
  // NOTE: This string will be replaced on build time with the package version.
48
- var version = "23.0.0";
48
+ var version = "23.2.0";
49
49
 
50
50
  const makeErrorToCapture = error => {
51
51
  if (error instanceof Error) return error;
@@ -103,11 +103,11 @@ const boot = () => {
103
103
  // suppress any resize observer errors, see
104
104
  // https://github.com/vercel/next.js/discussions/51551
105
105
  ignoreErrors: [/ResizeObserver loop (limit exceeded|completed with undelivered notifications)/i],
106
- integrations: [new Sentry__namespace.Integrations.GlobalHandlers({
106
+ integrations: [browser.globalHandlersIntegration({
107
107
  onunhandledrejection: false,
108
108
  onerror: false
109
- }), new browser.BrowserTracing({
110
- routingInstrumentation: Sentry__namespace.reactRouterV5Instrumentation(history__default["default"])
109
+ }), Sentry__namespace.reactRouterV5BrowserTracingIntegration({
110
+ history: history__default["default"]
111
111
  })],
112
112
  // Sending 5% of transactions. We can adjust that as we see a need to.
113
113
  // Generally we need to find a balance between performance and data volume.
@@ -119,9 +119,9 @@ const boot = () => {
119
119
  return redactUnsafeEventFields(event);
120
120
  }
121
121
  });
122
- Sentry__namespace.configureScope(scope => {
123
- scope.setTag('role', 'frontend');
124
- });
122
+ const sentryScope = Sentry__namespace.getCurrentScope();
123
+ sentryScope.setTag('role', 'frontend');
124
+ sentryScope.setTag('applicationName', window.app.applicationName);
125
125
  }
126
126
  };
127
127
  const isExtraAsObject = extrasOrExtra => typeof extrasOrExtra === 'object';
@@ -2,7 +2,7 @@ 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 * as Sentry from '@sentry/react';
5
- import { BrowserTracing } from '@sentry/browser';
5
+ import { globalHandlersIntegration } from '@sentry/browser';
6
6
  import history from '@commercetools-frontend/browser-history';
7
7
  import _Reflect$construct from '@babel/runtime-corejs3/core-js-stable/reflect/construct';
8
8
  import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
@@ -14,7 +14,7 @@ import _pt from 'prop-types';
14
14
  import { PureComponent, Component } from 'react';
15
15
 
16
16
  // NOTE: This string will be replaced on build time with the package version.
17
- var version = "23.0.0";
17
+ var version = "23.2.0";
18
18
 
19
19
  const makeErrorToCapture = error => {
20
20
  if (error instanceof Error) return error;
@@ -72,11 +72,11 @@ const boot = () => {
72
72
  // suppress any resize observer errors, see
73
73
  // https://github.com/vercel/next.js/discussions/51551
74
74
  ignoreErrors: [/ResizeObserver loop (limit exceeded|completed with undelivered notifications)/i],
75
- integrations: [new Sentry.Integrations.GlobalHandlers({
75
+ integrations: [globalHandlersIntegration({
76
76
  onunhandledrejection: false,
77
77
  onerror: false
78
- }), new BrowserTracing({
79
- routingInstrumentation: Sentry.reactRouterV5Instrumentation(history)
78
+ }), Sentry.reactRouterV5BrowserTracingIntegration({
79
+ history
80
80
  })],
81
81
  // Sending 5% of transactions. We can adjust that as we see a need to.
82
82
  // Generally we need to find a balance between performance and data volume.
@@ -88,9 +88,9 @@ const boot = () => {
88
88
  return redactUnsafeEventFields(event);
89
89
  }
90
90
  });
91
- Sentry.configureScope(scope => {
92
- scope.setTag('role', 'frontend');
93
- });
91
+ const sentryScope = Sentry.getCurrentScope();
92
+ sentryScope.setTag('role', 'frontend');
93
+ sentryScope.setTag('applicationName', window.app.applicationName);
94
94
  }
95
95
  };
96
96
  const isExtraAsObject = extrasOrExtra => typeof extrasOrExtra === 'object';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/sentry",
3
- "version": "23.0.0",
3
+ "version": "23.2.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": {
@@ -30,8 +30,8 @@
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.22.15",
32
32
  "@babel/runtime-corejs3": "^7.22.15",
33
- "@commercetools-frontend/browser-history": "23.0.0",
34
- "@commercetools-frontend/constants": "23.0.0",
33
+ "@commercetools-frontend/browser-history": "23.2.0",
34
+ "@commercetools-frontend/constants": "23.2.0",
35
35
  "@sentry/browser": "7.119.1",
36
36
  "@sentry/react": "7.117.0",
37
37
  "@sentry/types": "7.117.0",