@sentry/browser 9.39.0 → 9.40.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.
- package/build/npm/cjs/eventbuilder.js +2 -2
- package/build/npm/cjs/eventbuilder.js.map +1 -1
- package/build/npm/cjs/helpers.js +1 -1
- package/build/npm/cjs/helpers.js.map +1 -1
- package/build/npm/cjs/index.js +3 -0
- package/build/npm/cjs/index.js.map +1 -1
- package/build/npm/cjs/integrations/breadcrumbs.js +2 -2
- package/build/npm/cjs/integrations/breadcrumbs.js.map +1 -1
- package/build/npm/cjs/integrations/browserapierrors.js +1 -1
- package/build/npm/cjs/integrations/browserapierrors.js.map +1 -1
- package/build/npm/cjs/integrations/browsersession.js +1 -1
- package/build/npm/cjs/integrations/browsersession.js.map +1 -1
- package/build/npm/cjs/integrations/featureFlags/unleash/integration.js +1 -1
- package/build/npm/cjs/integrations/featureFlags/unleash/integration.js.map +1 -1
- package/build/npm/cjs/integrations/globalhandlers.js +1 -1
- package/build/npm/cjs/integrations/globalhandlers.js.map +1 -1
- package/build/npm/cjs/integrations/httpclient.js +1 -1
- package/build/npm/cjs/integrations/httpclient.js.map +1 -1
- package/build/npm/cjs/integrations/spotlight.js +4 -5
- package/build/npm/cjs/integrations/spotlight.js.map +1 -1
- package/build/npm/cjs/integrations/webWorker.js +139 -0
- package/build/npm/cjs/integrations/webWorker.js.map +1 -0
- package/build/npm/cjs/profiling/integration.js +3 -3
- package/build/npm/cjs/profiling/integration.js.map +1 -1
- package/build/npm/cjs/profiling/startProfileForSpan.js +5 -5
- package/build/npm/cjs/profiling/startProfileForSpan.js.map +1 -1
- package/build/npm/cjs/profiling/utils.js +16 -18
- package/build/npm/cjs/profiling/utils.js.map +1 -1
- package/build/npm/cjs/report-dialog.js +2 -2
- package/build/npm/cjs/report-dialog.js.map +1 -1
- package/build/npm/cjs/tracing/backgroundtab.js +2 -2
- package/build/npm/cjs/tracing/backgroundtab.js.map +1 -1
- package/build/npm/cjs/tracing/browserTracingIntegration.js +4 -4
- package/build/npm/cjs/tracing/browserTracingIntegration.js.map +1 -1
- package/build/npm/cjs/tracing/linkedTraces.js +3 -3
- package/build/npm/cjs/tracing/linkedTraces.js.map +1 -1
- package/build/npm/cjs/tracing/request.js +2 -2
- package/build/npm/cjs/tracing/request.js.map +1 -1
- package/build/npm/cjs/transports/offline.js +3 -3
- package/build/npm/cjs/transports/offline.js.map +1 -1
- package/build/npm/esm/eventbuilder.js +2 -2
- package/build/npm/esm/eventbuilder.js.map +1 -1
- package/build/npm/esm/helpers.js +1 -1
- package/build/npm/esm/helpers.js.map +1 -1
- package/build/npm/esm/index.js +1 -0
- package/build/npm/esm/index.js.map +1 -1
- package/build/npm/esm/integrations/breadcrumbs.js +3 -3
- package/build/npm/esm/integrations/breadcrumbs.js.map +1 -1
- package/build/npm/esm/integrations/browserapierrors.js +1 -1
- package/build/npm/esm/integrations/browserapierrors.js.map +1 -1
- package/build/npm/esm/integrations/browsersession.js +2 -2
- package/build/npm/esm/integrations/browsersession.js.map +1 -1
- package/build/npm/esm/integrations/featureFlags/unleash/integration.js +2 -2
- package/build/npm/esm/integrations/featureFlags/unleash/integration.js.map +1 -1
- package/build/npm/esm/integrations/globalhandlers.js +2 -2
- package/build/npm/esm/integrations/globalhandlers.js.map +1 -1
- package/build/npm/esm/integrations/httpclient.js +2 -2
- package/build/npm/esm/integrations/httpclient.js.map +1 -1
- package/build/npm/esm/integrations/spotlight.js +5 -6
- package/build/npm/esm/integrations/spotlight.js.map +1 -1
- package/build/npm/esm/integrations/webWorker.js +135 -0
- package/build/npm/esm/integrations/webWorker.js.map +1 -0
- package/build/npm/esm/package.json +1 -1
- package/build/npm/esm/profiling/integration.js +4 -4
- package/build/npm/esm/profiling/integration.js.map +1 -1
- package/build/npm/esm/profiling/startProfileForSpan.js +6 -6
- package/build/npm/esm/profiling/startProfileForSpan.js.map +1 -1
- package/build/npm/esm/profiling/utils.js +17 -19
- package/build/npm/esm/profiling/utils.js.map +1 -1
- package/build/npm/esm/report-dialog.js +3 -3
- package/build/npm/esm/report-dialog.js.map +1 -1
- package/build/npm/esm/tracing/backgroundtab.js +3 -3
- package/build/npm/esm/tracing/backgroundtab.js.map +1 -1
- package/build/npm/esm/tracing/browserTracingIntegration.js +5 -5
- package/build/npm/esm/tracing/browserTracingIntegration.js.map +1 -1
- package/build/npm/esm/tracing/linkedTraces.js +4 -4
- package/build/npm/esm/tracing/linkedTraces.js.map +1 -1
- package/build/npm/esm/tracing/request.js +2 -2
- package/build/npm/esm/tracing/request.js.map +1 -1
- package/build/npm/esm/transports/offline.js +3 -3
- package/build/npm/esm/transports/offline.js.map +1 -1
- package/build/npm/types/index.d.ts +1 -0
- package/build/npm/types/index.d.ts.map +1 -1
- package/build/npm/types/integrations/spotlight.d.ts.map +1 -1
- package/build/npm/types/integrations/webWorker.d.ts +103 -0
- package/build/npm/types/integrations/webWorker.d.ts.map +1 -0
- package/build/npm/types/profiling/utils.d.ts.map +1 -1
- package/build/npm/types-ts3.8/index.d.ts +1 -0
- package/build/npm/types-ts3.8/integrations/webWorker.d.ts +103 -0
- package/package.json +7 -7
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import type { Integration, IntegrationFn } from '@sentry/core';
|
|
2
|
+
export declare const INTEGRATION_NAME = "WebWorker";
|
|
3
|
+
interface WebWorkerIntegration extends Integration {
|
|
4
|
+
addWorker: (worker: Worker) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Use this integration to set up Sentry with web workers.
|
|
8
|
+
*
|
|
9
|
+
* IMPORTANT: This integration must be added **before** you start listening to
|
|
10
|
+
* any messages from the worker. Otherwise, your message handlers will receive
|
|
11
|
+
* messages from the Sentry SDK which you need to ignore.
|
|
12
|
+
*
|
|
13
|
+
* This integration only has an effect, if you call `Sentry.registerWorker(self)`
|
|
14
|
+
* from within the worker(s) you're adding to the integration.
|
|
15
|
+
*
|
|
16
|
+
* Given that you want to initialize the SDK as early as possible, you most likely
|
|
17
|
+
* want to add this integration **after** initializing the SDK:
|
|
18
|
+
*
|
|
19
|
+
* @example:
|
|
20
|
+
* ```ts filename={main.js}
|
|
21
|
+
* import * as Sentry from '@sentry/<your-sdk>';
|
|
22
|
+
*
|
|
23
|
+
* // some time earlier:
|
|
24
|
+
* Sentry.init(...)
|
|
25
|
+
*
|
|
26
|
+
* // 1. Initialize the worker
|
|
27
|
+
* const worker = new Worker(new URL('./worker.ts', import.meta.url));
|
|
28
|
+
*
|
|
29
|
+
* // 2. Add the integration
|
|
30
|
+
* const webWorkerIntegration = Sentry.webWorkerIntegration({ worker });
|
|
31
|
+
* Sentry.addIntegration(webWorkerIntegration);
|
|
32
|
+
*
|
|
33
|
+
* // 3. Register message listeners on the worker
|
|
34
|
+
* worker.addEventListener('message', event => {
|
|
35
|
+
* // ...
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* If you initialize multiple workers at the same time, you can also pass an array of workers
|
|
40
|
+
* to the integration:
|
|
41
|
+
*
|
|
42
|
+
* ```ts filename={main.js}
|
|
43
|
+
* const webWorkerIntegration = Sentry.webWorkerIntegration({ worker: [worker1, worker2] });
|
|
44
|
+
* Sentry.addIntegration(webWorkerIntegration);
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* If you have any additional workers that you initialize at a later point,
|
|
48
|
+
* you can add them to the integration as follows:
|
|
49
|
+
*
|
|
50
|
+
* ```ts filename={main.js}
|
|
51
|
+
* const webWorkerIntegration = Sentry.webWorkerIntegration({ worker: worker1 });
|
|
52
|
+
* Sentry.addIntegration(webWorkerIntegration);
|
|
53
|
+
*
|
|
54
|
+
* // sometime later:
|
|
55
|
+
* webWorkerIntegration.addWorker(worker2);
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* Of course, you can also directly add the integration in Sentry.init:
|
|
59
|
+
* ```ts filename={main.js}
|
|
60
|
+
* import * as Sentry from '@sentry/<your-sdk>';
|
|
61
|
+
*
|
|
62
|
+
* // 1. Initialize the worker
|
|
63
|
+
* const worker = new Worker(new URL('./worker.ts', import.meta.url));
|
|
64
|
+
*
|
|
65
|
+
* // 2. Initialize the SDK
|
|
66
|
+
* Sentry.init({
|
|
67
|
+
* integrations: [Sentry.webWorkerIntegration({ worker })]
|
|
68
|
+
* });
|
|
69
|
+
*
|
|
70
|
+
* // 3. Register message listeners on the worker
|
|
71
|
+
* worker.addEventListener('message', event => {
|
|
72
|
+
* // ...
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @param options {WebWorkerIntegrationOptions} Integration options:
|
|
77
|
+
* - `worker`: The worker instance.
|
|
78
|
+
*/
|
|
79
|
+
export declare const webWorkerIntegration: IntegrationFn<WebWorkerIntegration>;
|
|
80
|
+
interface RegisterWebWorkerOptions {
|
|
81
|
+
self: Worker & {
|
|
82
|
+
_sentryDebugIds?: Record<string, string>;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Use this function to register the worker with the Sentry SDK.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts filename={worker.js}
|
|
90
|
+
* import * as Sentry from '@sentry/<your-sdk>';
|
|
91
|
+
*
|
|
92
|
+
* // Do this as early as possible in your worker.
|
|
93
|
+
* Sentry.registerWorker({ self });
|
|
94
|
+
*
|
|
95
|
+
* // continue setting up your worker
|
|
96
|
+
* self.postMessage(...)
|
|
97
|
+
* ```
|
|
98
|
+
* @param options {RegisterWebWorkerOptions} Integration options:
|
|
99
|
+
* - `self`: The worker instance you're calling this function from (self).
|
|
100
|
+
*/
|
|
101
|
+
export declare function registerWebWorker({ self }: RegisterWebWorkerOptions): void;
|
|
102
|
+
export {};
|
|
103
|
+
//# sourceMappingURL=webWorker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webWorker.d.ts","sourceRoot":"","sources":["../../../../src/integrations/webWorker.ts"],"names":[],"mappings":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AO,GAAG,IAAI,CAMhB;AAMD;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAMxF;AACD;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAOxF"}
|
|
@@ -27,4 +27,5 @@ export { openFeatureIntegration, OpenFeatureIntegrationHook } from './integratio
|
|
|
27
27
|
export { unleashIntegration } from './integrations/featureFlags/unleash';
|
|
28
28
|
export { statsigIntegration } from './integrations/featureFlags/statsig';
|
|
29
29
|
export { diagnoseSdkConnectivity } from './diagnose-sdk';
|
|
30
|
+
export { webWorkerIntegration, registerWebWorker } from './integrations/webWorker';
|
|
30
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Integration, IntegrationFn } from '@sentry/core';
|
|
2
|
+
export declare const INTEGRATION_NAME = "WebWorker";
|
|
3
|
+
interface WebWorkerIntegration extends Integration {
|
|
4
|
+
addWorker: (worker: Worker) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Use this integration to set up Sentry with web workers.
|
|
8
|
+
*
|
|
9
|
+
* IMPORTANT: This integration must be added **before** you start listening to
|
|
10
|
+
* any messages from the worker. Otherwise, your message handlers will receive
|
|
11
|
+
* messages from the Sentry SDK which you need to ignore.
|
|
12
|
+
*
|
|
13
|
+
* This integration only has an effect, if you call `Sentry.registerWorker(self)`
|
|
14
|
+
* from within the worker(s) you're adding to the integration.
|
|
15
|
+
*
|
|
16
|
+
* Given that you want to initialize the SDK as early as possible, you most likely
|
|
17
|
+
* want to add this integration **after** initializing the SDK:
|
|
18
|
+
*
|
|
19
|
+
* @example:
|
|
20
|
+
* ```ts filename={main.js}
|
|
21
|
+
* import * as Sentry from '@sentry/<your-sdk>';
|
|
22
|
+
*
|
|
23
|
+
* // some time earlier:
|
|
24
|
+
* Sentry.init(...)
|
|
25
|
+
*
|
|
26
|
+
* // 1. Initialize the worker
|
|
27
|
+
* const worker = new Worker(new URL('./worker.ts', import.meta.url));
|
|
28
|
+
*
|
|
29
|
+
* // 2. Add the integration
|
|
30
|
+
* const webWorkerIntegration = Sentry.webWorkerIntegration({ worker });
|
|
31
|
+
* Sentry.addIntegration(webWorkerIntegration);
|
|
32
|
+
*
|
|
33
|
+
* // 3. Register message listeners on the worker
|
|
34
|
+
* worker.addEventListener('message', event => {
|
|
35
|
+
* // ...
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* If you initialize multiple workers at the same time, you can also pass an array of workers
|
|
40
|
+
* to the integration:
|
|
41
|
+
*
|
|
42
|
+
* ```ts filename={main.js}
|
|
43
|
+
* const webWorkerIntegration = Sentry.webWorkerIntegration({ worker: [worker1, worker2] });
|
|
44
|
+
* Sentry.addIntegration(webWorkerIntegration);
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* If you have any additional workers that you initialize at a later point,
|
|
48
|
+
* you can add them to the integration as follows:
|
|
49
|
+
*
|
|
50
|
+
* ```ts filename={main.js}
|
|
51
|
+
* const webWorkerIntegration = Sentry.webWorkerIntegration({ worker: worker1 });
|
|
52
|
+
* Sentry.addIntegration(webWorkerIntegration);
|
|
53
|
+
*
|
|
54
|
+
* // sometime later:
|
|
55
|
+
* webWorkerIntegration.addWorker(worker2);
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* Of course, you can also directly add the integration in Sentry.init:
|
|
59
|
+
* ```ts filename={main.js}
|
|
60
|
+
* import * as Sentry from '@sentry/<your-sdk>';
|
|
61
|
+
*
|
|
62
|
+
* // 1. Initialize the worker
|
|
63
|
+
* const worker = new Worker(new URL('./worker.ts', import.meta.url));
|
|
64
|
+
*
|
|
65
|
+
* // 2. Initialize the SDK
|
|
66
|
+
* Sentry.init({
|
|
67
|
+
* integrations: [Sentry.webWorkerIntegration({ worker })]
|
|
68
|
+
* });
|
|
69
|
+
*
|
|
70
|
+
* // 3. Register message listeners on the worker
|
|
71
|
+
* worker.addEventListener('message', event => {
|
|
72
|
+
* // ...
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @param options {WebWorkerIntegrationOptions} Integration options:
|
|
77
|
+
* - `worker`: The worker instance.
|
|
78
|
+
*/
|
|
79
|
+
export declare const webWorkerIntegration: IntegrationFn<WebWorkerIntegration>;
|
|
80
|
+
interface RegisterWebWorkerOptions {
|
|
81
|
+
self: Worker & {
|
|
82
|
+
_sentryDebugIds?: Record<string, string>;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Use this function to register the worker with the Sentry SDK.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts filename={worker.js}
|
|
90
|
+
* import * as Sentry from '@sentry/<your-sdk>';
|
|
91
|
+
*
|
|
92
|
+
* // Do this as early as possible in your worker.
|
|
93
|
+
* Sentry.registerWorker({ self });
|
|
94
|
+
*
|
|
95
|
+
* // continue setting up your worker
|
|
96
|
+
* self.postMessage(...)
|
|
97
|
+
* ```
|
|
98
|
+
* @param options {RegisterWebWorkerOptions} Integration options:
|
|
99
|
+
* - `self`: The worker instance you're calling this function from (self).
|
|
100
|
+
*/
|
|
101
|
+
export declare function registerWebWorker({ self }: RegisterWebWorkerOptions): void;
|
|
102
|
+
export {};
|
|
103
|
+
//# sourceMappingURL=webWorker.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/browser",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.40.0",
|
|
4
4
|
"description": "Official Sentry SDK for browsers",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@sentry-internal/browser-utils": "9.
|
|
43
|
-
"@sentry-internal/feedback": "9.
|
|
44
|
-
"@sentry-internal/replay": "9.
|
|
45
|
-
"@sentry-internal/replay-canvas": "9.
|
|
46
|
-
"@sentry/core": "9.
|
|
42
|
+
"@sentry-internal/browser-utils": "9.40.0",
|
|
43
|
+
"@sentry-internal/feedback": "9.40.0",
|
|
44
|
+
"@sentry-internal/replay": "9.40.0",
|
|
45
|
+
"@sentry-internal/replay-canvas": "9.40.0",
|
|
46
|
+
"@sentry/core": "9.40.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@sentry-internal/integration-shims": "9.
|
|
49
|
+
"@sentry-internal/integration-shims": "9.40.0",
|
|
50
50
|
"fake-indexeddb": "^4.0.1"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|