@sentry/browser 10.26.0 → 10.27.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/dev/client.js +0 -1
- package/build/npm/cjs/dev/client.js.map +1 -1
- package/build/npm/cjs/dev/index.js +2 -0
- package/build/npm/cjs/dev/index.js.map +1 -1
- package/build/npm/cjs/dev/profiling/UIProfiler.js +98 -41
- package/build/npm/cjs/dev/profiling/UIProfiler.js.map +1 -1
- package/build/npm/cjs/dev/profiling/index.js +59 -0
- package/build/npm/cjs/dev/profiling/index.js.map +1 -0
- package/build/npm/cjs/dev/profiling/integration.js +12 -10
- package/build/npm/cjs/dev/profiling/integration.js.map +1 -1
- package/build/npm/cjs/dev/profiling/utils.js +11 -5
- package/build/npm/cjs/dev/profiling/utils.js.map +1 -1
- package/build/npm/cjs/prod/client.js +0 -1
- package/build/npm/cjs/prod/client.js.map +1 -1
- package/build/npm/cjs/prod/index.js +2 -0
- package/build/npm/cjs/prod/index.js.map +1 -1
- package/build/npm/cjs/prod/profiling/UIProfiler.js +98 -41
- package/build/npm/cjs/prod/profiling/UIProfiler.js.map +1 -1
- package/build/npm/cjs/prod/profiling/index.js +59 -0
- package/build/npm/cjs/prod/profiling/index.js.map +1 -0
- package/build/npm/cjs/prod/profiling/integration.js +12 -10
- package/build/npm/cjs/prod/profiling/integration.js.map +1 -1
- package/build/npm/cjs/prod/profiling/utils.js +11 -5
- package/build/npm/cjs/prod/profiling/utils.js.map +1 -1
- package/build/npm/esm/dev/client.js +0 -1
- package/build/npm/esm/dev/client.js.map +1 -1
- package/build/npm/esm/dev/index.js +1 -0
- package/build/npm/esm/dev/index.js.map +1 -1
- package/build/npm/esm/dev/package.json +1 -1
- package/build/npm/esm/dev/profiling/UIProfiler.js +100 -43
- package/build/npm/esm/dev/profiling/UIProfiler.js.map +1 -1
- package/build/npm/esm/dev/profiling/index.js +57 -0
- package/build/npm/esm/dev/profiling/index.js.map +1 -0
- package/build/npm/esm/dev/profiling/integration.js +13 -11
- package/build/npm/esm/dev/profiling/integration.js.map +1 -1
- package/build/npm/esm/dev/profiling/utils.js +12 -6
- package/build/npm/esm/dev/profiling/utils.js.map +1 -1
- package/build/npm/esm/prod/client.js +0 -1
- package/build/npm/esm/prod/client.js.map +1 -1
- package/build/npm/esm/prod/index.js +1 -0
- package/build/npm/esm/prod/index.js.map +1 -1
- package/build/npm/esm/prod/package.json +1 -1
- package/build/npm/esm/prod/profiling/UIProfiler.js +100 -43
- package/build/npm/esm/prod/profiling/UIProfiler.js.map +1 -1
- package/build/npm/esm/prod/profiling/index.js +57 -0
- package/build/npm/esm/prod/profiling/index.js.map +1 -0
- package/build/npm/esm/prod/profiling/integration.js +13 -11
- package/build/npm/esm/prod/profiling/integration.js.map +1 -1
- package/build/npm/esm/prod/profiling/utils.js +12 -6
- package/build/npm/esm/prod/profiling/utils.js.map +1 -1
- package/build/npm/types/client.d.ts.map +1 -1
- package/build/npm/types/exports.d.ts +1 -0
- package/build/npm/types/exports.d.ts.map +1 -1
- package/build/npm/types/profiling/UIProfiler.d.ts +23 -22
- package/build/npm/types/profiling/UIProfiler.d.ts.map +1 -1
- package/build/npm/types/profiling/index.d.ts +8 -0
- package/build/npm/types/profiling/index.d.ts.map +1 -0
- package/build/npm/types/profiling/integration.d.ts.map +1 -1
- package/build/npm/types/profiling/utils.d.ts +1 -1
- package/build/npm/types/profiling/utils.d.ts.map +1 -1
- package/build/npm/types-ts3.8/exports.d.ts +1 -0
- package/build/npm/types-ts3.8/profiling/UIProfiler.d.ts +23 -22
- package/build/npm/types-ts3.8/profiling/index.d.ts +8 -0
- package/build/npm/types-ts3.8/profiling/utils.d.ts +1 -1
- package/package.json +7 -7
|
@@ -1,51 +1,52 @@
|
|
|
1
|
-
import type { Client, Span } from '@sentry/core';
|
|
1
|
+
import type { Client, ContinuousProfiler, Span } from '@sentry/core';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* UIProfiler (Profiling V2):
|
|
4
|
+
* Supports two lifecycle modes:
|
|
5
|
+
* - 'manual': controlled explicitly via start()/stop()
|
|
6
|
+
* - 'trace': automatically runs while there are active sampled root spans
|
|
7
7
|
*
|
|
8
8
|
* Profiles are emitted as standalone `profile_chunk` envelopes either when:
|
|
9
9
|
* - there are no more sampled root spans, or
|
|
10
10
|
* - the 60s chunk timer elapses while profiling is running.
|
|
11
11
|
*/
|
|
12
|
-
export declare class UIProfiler {
|
|
12
|
+
export declare class UIProfiler implements ContinuousProfiler<Client> {
|
|
13
13
|
private _client;
|
|
14
14
|
private _profiler;
|
|
15
15
|
private _chunkTimer;
|
|
16
|
-
private _activeRootSpanIds;
|
|
17
|
-
private _rootSpanTimeouts;
|
|
18
16
|
private _profilerId;
|
|
19
17
|
private _isRunning;
|
|
20
18
|
private _sessionSampled;
|
|
19
|
+
private _lifecycleMode;
|
|
20
|
+
private _activeRootSpanIds;
|
|
21
|
+
private _rootSpanTimeouts;
|
|
21
22
|
constructor();
|
|
22
23
|
/**
|
|
23
|
-
* Initialize the profiler with client
|
|
24
|
-
*/
|
|
25
|
-
initialize(client: Client, sessionSampled: boolean): void;
|
|
26
|
-
/**
|
|
27
|
-
* Handle an already-active root span at integration setup time.
|
|
28
|
-
*/
|
|
29
|
-
notifyRootSpanActive(rootSpan: Span): void;
|
|
30
|
-
/**
|
|
31
|
-
* Start profiling if not already running.
|
|
24
|
+
* Initialize the profiler with client, session sampling and lifecycle mode.
|
|
32
25
|
*/
|
|
26
|
+
initialize(client: Client): void;
|
|
27
|
+
/** Starts UI profiling (only effective in 'manual' mode and when sampled). */
|
|
33
28
|
start(): void;
|
|
29
|
+
/** Stops UI profiling (only effective in 'manual' mode). */
|
|
30
|
+
stop(): void;
|
|
31
|
+
/** Handle an already-active root span at integration setup time (used only in trace mode). */
|
|
32
|
+
notifyRootSpanActive(rootSpan: Span): void;
|
|
34
33
|
/**
|
|
35
|
-
*
|
|
34
|
+
* Begin profiling if not already running.
|
|
36
35
|
*/
|
|
37
|
-
|
|
36
|
+
private _beginProfiling;
|
|
37
|
+
/** End profiling session; final chunk will be collected and sent. */
|
|
38
|
+
private _endProfiling;
|
|
38
39
|
/** Trace-mode: attach spanStart/spanEnd listeners. */
|
|
39
40
|
private _setupTraceLifecycleListeners;
|
|
40
41
|
/**
|
|
41
|
-
* Resets profiling information from scope and resets running state
|
|
42
|
+
* Resets profiling information from scope and resets running state (used on failure)
|
|
42
43
|
*/
|
|
43
44
|
private _resetProfilerInfo;
|
|
44
45
|
/**
|
|
45
46
|
* Clear and reset all per-root-span timeouts.
|
|
46
47
|
*/
|
|
47
48
|
private _clearAllRootSpanTimeouts;
|
|
48
|
-
/**
|
|
49
|
+
/** Keep track of root spans and schedule safeguard timeout (trace mode). */
|
|
49
50
|
private _registerTraceRootSpan;
|
|
50
51
|
/**
|
|
51
52
|
* Start a profiler instance if needed.
|
|
@@ -63,7 +64,7 @@ export declare class UIProfiler {
|
|
|
63
64
|
*/
|
|
64
65
|
private _onRootSpanTimeout;
|
|
65
66
|
/**
|
|
66
|
-
* Stop
|
|
67
|
+
* Stop current profiler instance, convert profile to chunk & send.
|
|
67
68
|
*/
|
|
68
69
|
private _collectCurrentChunk;
|
|
69
70
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIProfiler.d.ts","sourceRoot":"","sources":["../../../../src/profiling/UIProfiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAgB,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"UIProfiler.d.ts","sourceRoot":"","sources":["../../../../src/profiling/UIProfiler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,kBAAkB,EAAgB,IAAI,EAAE,MAAM,cAAc,CAAC;AAoBnF;;;;;;;;;GASG;AACH,qBAAa,UAAW,YAAW,kBAAkB,CAAC,MAAM,CAAC;IAC3D,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,SAAS,CAA6B;IAC9C,OAAO,CAAC,WAAW,CAA4C;IAG/D,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,cAAc,CAAiC;IAGvD,OAAO,CAAC,kBAAkB,CAAc;IACxC,OAAO,CAAC,iBAAiB,CAA6C;;IAgBtE;;OAEG;IACI,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAqBvC,8EAA8E;IACvE,KAAK,IAAI,IAAI;IAsBpB,4DAA4D;IACrD,IAAI,IAAI,IAAI;IAiBnB,8FAA8F;IACvF,oBAAoB,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI;IAsBjD;;OAEG;IACH,OAAO,CAAC,eAAe;IAsBvB,qEAAqE;IACrE,OAAO,CAAC,aAAa;IAyBrB,sDAAsD;IACtD,OAAO,CAAC,6BAA6B;IAwDrC;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAK1B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAKjC,4EAA4E;IAC5E,OAAO,CAAC,sBAAsB;IAM9B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAY9B;;;;OAIG;IACH,OAAO,CAAC,sBAAsB;IAwB9B;;;OAGG;IACH,OAAO,CAAC,kBAAkB;IAuB1B;;OAEG;YACW,oBAAoB;IAiClC;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAsB1B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Profiler } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* Profiler namespace for controlling the JS profiler in 'manual' mode.
|
|
4
|
+
*
|
|
5
|
+
* Requires the `browserProfilingIntegration` from the `@sentry/browser` package.
|
|
6
|
+
*/
|
|
7
|
+
export declare const uiProfiler: Profiler;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/profiling/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AA8C7C;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,QAGxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../src/profiling/integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../../src/profiling/integration.ts"],"names":[],"mappings":"AA+JA,eAAO,MAAM,2BAA2B,0CAAkD,CAAC"}
|
|
@@ -82,7 +82,7 @@ export declare function startJSSelfProfile(): JSSelfProfiler | undefined;
|
|
|
82
82
|
*/
|
|
83
83
|
export declare function shouldProfileSpanLegacy(span: Span): boolean;
|
|
84
84
|
/**
|
|
85
|
-
* Determine if a profile should be created for the current session
|
|
85
|
+
* Determine if a profile should be created for the current session.
|
|
86
86
|
*/
|
|
87
87
|
export declare function shouldProfileSession(options: BrowserOptions): boolean;
|
|
88
88
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/profiling/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EAEN,UAAU,EACV,QAAQ,EACR,KAAK,EACL,aAAa,EACb,OAAO,EACP,YAAY,EACZ,IAAI,EACJ,gBAAgB,EACjB,MAAM,cAAc,CAAC;AAatB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAiD,MAAM,mBAAmB,CAAC;AAQtH,eAAO,MAAM,yBAAyB,QAAY,CAAC;AACnD,eAAO,MAAM,oBAAoB,QAAmC,CAAC;AA2DrE;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,OA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AAE,aAAa,GACnB,OAAO,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,CASxF;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CA8B/D"}
|
|
@@ -5,6 +5,7 @@ export { SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTI
|
|
|
5
5
|
export { WINDOW } from './helpers';
|
|
6
6
|
export { BrowserClient } from './client';
|
|
7
7
|
export { makeFetchTransport } from './transports/fetch';
|
|
8
|
+
export { uiProfiler } from './profiling';
|
|
8
9
|
export { defaultStackParser, defaultStackLineParsers, chromeStackLineParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser, } from './stack-parsers';
|
|
9
10
|
export { eventFromException, eventFromMessage, exceptionFromError } from './eventbuilder';
|
|
10
11
|
export { createUserFeedbackEnvelope } from './userfeedback';
|
|
@@ -1,51 +1,52 @@
|
|
|
1
|
-
import { Client, Span } from '@sentry/core';
|
|
1
|
+
import { Client, ContinuousProfiler, Span } from '@sentry/core';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* UIProfiler (Profiling V2):
|
|
4
|
+
* Supports two lifecycle modes:
|
|
5
|
+
* - 'manual': controlled explicitly via start()/stop()
|
|
6
|
+
* - 'trace': automatically runs while there are active sampled root spans
|
|
7
7
|
*
|
|
8
8
|
* Profiles are emitted as standalone `profile_chunk` envelopes either when:
|
|
9
9
|
* - there are no more sampled root spans, or
|
|
10
10
|
* - the 60s chunk timer elapses while profiling is running.
|
|
11
11
|
*/
|
|
12
|
-
export declare class UIProfiler {
|
|
12
|
+
export declare class UIProfiler implements ContinuousProfiler<Client> {
|
|
13
13
|
private _client;
|
|
14
14
|
private _profiler;
|
|
15
15
|
private _chunkTimer;
|
|
16
|
-
private _activeRootSpanIds;
|
|
17
|
-
private _rootSpanTimeouts;
|
|
18
16
|
private _profilerId;
|
|
19
17
|
private _isRunning;
|
|
20
18
|
private _sessionSampled;
|
|
19
|
+
private _lifecycleMode;
|
|
20
|
+
private _activeRootSpanIds;
|
|
21
|
+
private _rootSpanTimeouts;
|
|
21
22
|
constructor();
|
|
22
23
|
/**
|
|
23
|
-
* Initialize the profiler with client
|
|
24
|
-
*/
|
|
25
|
-
initialize(client: Client, sessionSampled: boolean): void;
|
|
26
|
-
/**
|
|
27
|
-
* Handle an already-active root span at integration setup time.
|
|
28
|
-
*/
|
|
29
|
-
notifyRootSpanActive(rootSpan: Span): void;
|
|
30
|
-
/**
|
|
31
|
-
* Start profiling if not already running.
|
|
24
|
+
* Initialize the profiler with client, session sampling and lifecycle mode.
|
|
32
25
|
*/
|
|
26
|
+
initialize(client: Client): void;
|
|
27
|
+
/** Starts UI profiling (only effective in 'manual' mode and when sampled). */
|
|
33
28
|
start(): void;
|
|
29
|
+
/** Stops UI profiling (only effective in 'manual' mode). */
|
|
30
|
+
stop(): void;
|
|
31
|
+
/** Handle an already-active root span at integration setup time (used only in trace mode). */
|
|
32
|
+
notifyRootSpanActive(rootSpan: Span): void;
|
|
34
33
|
/**
|
|
35
|
-
*
|
|
34
|
+
* Begin profiling if not already running.
|
|
36
35
|
*/
|
|
37
|
-
|
|
36
|
+
private _beginProfiling;
|
|
37
|
+
/** End profiling session; final chunk will be collected and sent. */
|
|
38
|
+
private _endProfiling;
|
|
38
39
|
/** Trace-mode: attach spanStart/spanEnd listeners. */
|
|
39
40
|
private _setupTraceLifecycleListeners;
|
|
40
41
|
/**
|
|
41
|
-
* Resets profiling information from scope and resets running state
|
|
42
|
+
* Resets profiling information from scope and resets running state (used on failure)
|
|
42
43
|
*/
|
|
43
44
|
private _resetProfilerInfo;
|
|
44
45
|
/**
|
|
45
46
|
* Clear and reset all per-root-span timeouts.
|
|
46
47
|
*/
|
|
47
48
|
private _clearAllRootSpanTimeouts;
|
|
48
|
-
/**
|
|
49
|
+
/** Keep track of root spans and schedule safeguard timeout (trace mode). */
|
|
49
50
|
private _registerTraceRootSpan;
|
|
50
51
|
/**
|
|
51
52
|
* Start a profiler instance if needed.
|
|
@@ -63,7 +64,7 @@ export declare class UIProfiler {
|
|
|
63
64
|
*/
|
|
64
65
|
private _onRootSpanTimeout;
|
|
65
66
|
/**
|
|
66
|
-
* Stop
|
|
67
|
+
* Stop current profiler instance, convert profile to chunk & send.
|
|
67
68
|
*/
|
|
68
69
|
private _collectCurrentChunk;
|
|
69
70
|
/**
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Profiler } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* Profiler namespace for controlling the JS profiler in 'manual' mode.
|
|
4
|
+
*
|
|
5
|
+
* Requires the `browserProfilingIntegration` from the `@sentry/browser` package.
|
|
6
|
+
*/
|
|
7
|
+
export declare const uiProfiler: Profiler;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -82,7 +82,7 @@ export declare function startJSSelfProfile(): JSSelfProfiler | undefined;
|
|
|
82
82
|
*/
|
|
83
83
|
export declare function shouldProfileSpanLegacy(span: Span): boolean;
|
|
84
84
|
/**
|
|
85
|
-
* Determine if a profile should be created for the current session
|
|
85
|
+
* Determine if a profile should be created for the current session.
|
|
86
86
|
*/
|
|
87
87
|
export declare function shouldProfileSession(options: BrowserOptions): boolean;
|
|
88
88
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/browser",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.27.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",
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
"access": "public"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@sentry-internal/browser-utils": "10.
|
|
48
|
-
"@sentry-internal/feedback": "10.
|
|
49
|
-
"@sentry-internal/replay": "10.
|
|
50
|
-
"@sentry-internal/replay-canvas": "10.
|
|
51
|
-
"@sentry/core": "10.
|
|
47
|
+
"@sentry-internal/browser-utils": "10.27.0",
|
|
48
|
+
"@sentry-internal/feedback": "10.27.0",
|
|
49
|
+
"@sentry-internal/replay": "10.27.0",
|
|
50
|
+
"@sentry-internal/replay-canvas": "10.27.0",
|
|
51
|
+
"@sentry/core": "10.27.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@sentry-internal/integration-shims": "10.
|
|
54
|
+
"@sentry-internal/integration-shims": "10.27.0",
|
|
55
55
|
"fake-indexeddb": "^6.2.4"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|