@safaricom-mxl/web-sdk 0.1.1 → 0.1.3
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/UPGRADING.md +25 -0
- package/dist/api-logs/manager/types.d.cts +6 -1
- package/dist/api-logs/manager/types.d.cts.map +1 -1
- package/dist/api-logs/manager/types.d.ts +6 -1
- package/dist/api-logs/manager/types.d.ts.map +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.cjs +5 -0
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.cjs.map +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.cts +3 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.cts.map +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts +3 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts.map +1 -1
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.js +5 -0
- package/dist/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.js.map +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.cjs +6 -0
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.cjs.map +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.cts +3 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.cts.map +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts +3 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts.map +1 -1
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.js +6 -0
- package/dist/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.js.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +2 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.cjs +21 -20
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.cjs.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.js +17 -16
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.js.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/enums/PerformanceTimingNames.cjs +32 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/enums/PerformanceTimingNames.cjs.map +1 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/enums/PerformanceTimingNames.d.cts +29 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/enums/PerformanceTimingNames.d.cts.map +1 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/enums/PerformanceTimingNames.d.ts +29 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/enums/PerformanceTimingNames.d.ts.map +1 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/enums/PerformanceTimingNames.js +31 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/enums/PerformanceTimingNames.js.map +1 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.cjs +34 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.cjs.map +1 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.cts +34 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.cts.map +1 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.ts +34 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.d.ts.map +1 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.js +31 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/networkEvents.js.map +1 -0
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.cjs +5 -5
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.cjs.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.d.cts +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.d.cts.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.d.ts +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.d.ts.map +1 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.js +2 -1
- package/dist/instrumentations/document-load/DocumentLoadInstrumentation/utils.js.map +1 -1
- package/dist/instrumentations/replay/events/startEventCapture.cjs +2 -1
- package/dist/instrumentations/replay/events/startEventCapture.cjs.map +1 -1
- package/dist/instrumentations/replay/events/startEventCapture.d.cts +2 -0
- package/dist/instrumentations/replay/events/startEventCapture.d.cts.map +1 -1
- package/dist/instrumentations/replay/events/startEventCapture.d.ts +2 -0
- package/dist/instrumentations/replay/events/startEventCapture.d.ts.map +1 -1
- package/dist/instrumentations/replay/events/startEventCapture.js +2 -1
- package/dist/instrumentations/replay/events/startEventCapture.js.map +1 -1
- package/dist/instrumentations/replay/recorder/startRecording.cjs +2 -4
- package/dist/instrumentations/replay/recorder/startRecording.cjs.map +1 -1
- package/dist/instrumentations/replay/recorder/startRecording.d.cts +2 -0
- package/dist/instrumentations/replay/recorder/startRecording.d.cts.map +1 -1
- package/dist/instrumentations/replay/recorder/startRecording.d.ts +2 -0
- package/dist/instrumentations/replay/recorder/startRecording.d.ts.map +1 -1
- package/dist/instrumentations/replay/recorder/startRecording.js +2 -4
- package/dist/instrumentations/replay/recorder/startRecording.js.map +1 -1
- package/dist/instrumentations/replay/recorder/types.d.cts +0 -1
- package/dist/instrumentations/replay/recorder/types.d.cts.map +1 -1
- package/dist/instrumentations/replay/recorder/types.d.ts +0 -1
- package/dist/instrumentations/replay/recorder/types.d.ts.map +1 -1
- package/dist/instrumentations/replay/session-recording/SessionRecording.cjs +16 -1
- package/dist/instrumentations/replay/session-recording/SessionRecording.cjs.map +1 -1
- package/dist/instrumentations/replay/session-recording/SessionRecording.d.cts +2 -0
- package/dist/instrumentations/replay/session-recording/SessionRecording.d.cts.map +1 -1
- package/dist/instrumentations/replay/session-recording/SessionRecording.d.ts +2 -0
- package/dist/instrumentations/replay/session-recording/SessionRecording.d.ts.map +1 -1
- package/dist/instrumentations/replay/session-recording/SessionRecording.js +16 -1
- package/dist/instrumentations/replay/session-recording/SessionRecording.js.map +1 -1
- package/dist/instrumentations/replay/session-recording/lifecycle.cjs +6 -4
- package/dist/instrumentations/replay/session-recording/lifecycle.cjs.map +1 -1
- package/dist/instrumentations/replay/session-recording/lifecycle.d.cts +4 -3
- package/dist/instrumentations/replay/session-recording/lifecycle.d.cts.map +1 -1
- package/dist/instrumentations/replay/session-recording/lifecycle.d.ts +4 -3
- package/dist/instrumentations/replay/session-recording/lifecycle.d.ts.map +1 -1
- package/dist/instrumentations/replay/session-recording/lifecycle.js +6 -4
- package/dist/instrumentations/replay/session-recording/lifecycle.js.map +1 -1
- package/dist/managers/MXLLogManager/MXLLogManager.cjs +3 -1
- package/dist/managers/MXLLogManager/MXLLogManager.cjs.map +1 -1
- package/dist/managers/MXLLogManager/MXLLogManager.d.cts +2 -1
- package/dist/managers/MXLLogManager/MXLLogManager.d.cts.map +1 -1
- package/dist/managers/MXLLogManager/MXLLogManager.d.ts +2 -1
- package/dist/managers/MXLLogManager/MXLLogManager.d.ts.map +1 -1
- package/dist/managers/MXLLogManager/MXLLogManager.js +4 -2
- package/dist/managers/MXLLogManager/MXLLogManager.js.map +1 -1
- package/dist/managers/MXLPageManager/MXLPageManager.cjs +1 -1
- package/dist/managers/MXLPageManager/MXLPageManager.js +1 -1
- package/dist/managers/MXLUserManager/MXLUserManager.cjs +1 -1
- package/dist/managers/MXLUserManager/MXLUserManager.js +1 -1
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.cjs +17 -3
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.cjs.map +1 -1
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.cts +3 -1
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.cts.map +1 -1
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.ts +3 -1
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.d.ts.map +1 -1
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.js +17 -3
- package/dist/managers/MXLUserSessionManager/MXLUserSessionManager.js.map +1 -1
- package/dist/managers/MXLUserSessionManager/constants.cjs +1 -1
- package/dist/managers/MXLUserSessionManager/constants.cjs.map +1 -1
- package/dist/managers/MXLUserSessionManager/constants.d.cts +1 -1
- package/dist/managers/MXLUserSessionManager/constants.d.ts +1 -1
- package/dist/managers/MXLUserSessionManager/constants.js +1 -1
- package/dist/managers/MXLUserSessionManager/constants.js.map +1 -1
- package/dist/managers/MXLUserSessionManager/types.d.cts +10 -1
- package/dist/managers/MXLUserSessionManager/types.d.cts.map +1 -1
- package/dist/managers/MXLUserSessionManager/types.d.ts +10 -1
- package/dist/managers/MXLUserSessionManager/types.d.ts.map +1 -1
- package/dist/managers/MXLUserSessionManager/utils/state.cjs +19 -6
- package/dist/managers/MXLUserSessionManager/utils/state.cjs.map +1 -1
- package/dist/managers/MXLUserSessionManager/utils/state.d.cts +3 -2
- package/dist/managers/MXLUserSessionManager/utils/state.d.cts.map +1 -1
- package/dist/managers/MXLUserSessionManager/utils/state.d.ts +3 -2
- package/dist/managers/MXLUserSessionManager/utils/state.d.ts.map +1 -1
- package/dist/managers/MXLUserSessionManager/utils/state.js +19 -7
- package/dist/managers/MXLUserSessionManager/utils/state.js.map +1 -1
- package/dist/managers/MXLUserSessionManager/utils/tabTracking.cjs +1 -1
- package/dist/managers/MXLUserSessionManager/utils/tabTracking.js +1 -1
- package/dist/mxl-web-sdk.js +2 -2
- package/dist/mxl-web-sdk.js.map +1 -1
- package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.cjs +1 -1
- package/dist/processors/UserSessionLogRecordProcessor/UserSessionLogRecordProcessor.js +1 -1
- package/dist/resources/sdkConstants.cjs +1 -1
- package/dist/resources/sdkConstants.cjs.map +1 -1
- package/dist/resources/sdkConstants.d.cts +1 -1
- package/dist/resources/sdkConstants.d.ts +1 -1
- package/dist/resources/sdkConstants.js +1 -1
- package/dist/resources/sdkConstants.js.map +1 -1
- package/dist/sdk/initSDK.cjs +4 -2
- package/dist/sdk/initSDK.cjs.map +1 -1
- package/dist/sdk/initSDK.d.cts.map +1 -1
- package/dist/sdk/initSDK.d.ts.map +1 -1
- package/dist/sdk/initSDK.js +4 -2
- package/dist/sdk/initSDK.js.map +1 -1
- package/dist/sdk/responseSpanContext.cjs +34 -0
- package/dist/sdk/responseSpanContext.cjs.map +1 -0
- package/dist/sdk/responseSpanContext.d.cts +16 -0
- package/dist/sdk/responseSpanContext.d.cts.map +1 -0
- package/dist/sdk/responseSpanContext.d.ts +16 -0
- package/dist/sdk/responseSpanContext.d.ts.map +1 -0
- package/dist/sdk/responseSpanContext.js +31 -0
- package/dist/sdk/responseSpanContext.js.map +1 -0
- package/package.json +14 -15
package/UPGRADING.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Upgrading
|
|
2
2
|
|
|
3
|
+
## 0.1.2 to 0.1.3
|
|
4
|
+
|
|
5
|
+
No breaking changes.
|
|
6
|
+
|
|
7
|
+
`log.logException` accepts `spanContext`. Pass it when you report a failure after its span has ended, so the exception
|
|
8
|
+
log carries that trace instead of none. `getResponseSpanContext(response)` returns the span context of the fetch that
|
|
9
|
+
produced a `Response`:
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
import { getResponseSpanContext, log } from '@safaricom-mxl/web-sdk';
|
|
13
|
+
|
|
14
|
+
const response = await fetch('/api/orders', { method: 'POST' });
|
|
15
|
+
if (!response.ok) {
|
|
16
|
+
log.logException(new Error(`Order failed: ${response.status}`), {
|
|
17
|
+
spanContext: getResponseSpanContext(response),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`getResponseSpanContext` returns `undefined` when the fetch instrumentation is omitted or the request was ignored.
|
|
23
|
+
|
|
24
|
+
Session replay meta rows now send `error_count`, `page_views` and `click_count` on every heartbeat, not only
|
|
25
|
+
`click_count` when the session ends. The totals cover the whole user session and survive reloads. Every exception
|
|
26
|
+
the SDK logs counts once toward `error_count`, after filters, dedup and limits.
|
|
27
|
+
|
|
3
28
|
## 0.0.x to 0.1.0
|
|
4
29
|
|
|
5
30
|
`initSDK` props were renamed and grouped. Passing a removed prop makes `initSDK` return `false` and log an error that
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AttributeValue } from "@opentelemetry/api";
|
|
1
|
+
import { AttributeValue, SpanContext } from "@opentelemetry/api";
|
|
2
2
|
|
|
3
3
|
//#region src/api-logs/manager/types.d.ts
|
|
4
4
|
interface LogMessageOptions {
|
|
@@ -11,6 +11,11 @@ interface LogExceptionOptions {
|
|
|
11
11
|
attributes?: Record<string, AttributeValue | undefined>;
|
|
12
12
|
timestamp?: number;
|
|
13
13
|
handler?: ExceptionHandlerType;
|
|
14
|
+
/**
|
|
15
|
+
* Trace to attach when the exception is reported after its span ended, such as a failed request
|
|
16
|
+
* handled later (see `getResponseSpanContext`). Defaults to the active span.
|
|
17
|
+
*/
|
|
18
|
+
spanContext?: SpanContext;
|
|
14
19
|
}
|
|
15
20
|
/** Return false to drop the exception. */
|
|
16
21
|
type ExceptionFilter = (error: unknown) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/api-logs/manager/types.ts"],"mappings":";;;UAEiB,iBAAA;EACf,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,iBAAA;EACA,UAAA;AAAA;AAAA,UAGe,mBAAA;EACf,OAAA;EACA,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,SAAA;EACA,OAAA,GAAU,oBAAA;AAAA;;
|
|
1
|
+
{"version":3,"file":"types.d.cts","names":[],"sources":["../../../src/api-logs/manager/types.ts"],"mappings":";;;UAEiB,iBAAA;EACf,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,iBAAA;EACA,UAAA;AAAA;AAAA,UAGe,mBAAA;EACf,OAAA;EACA,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,SAAA;EACA,OAAA,GAAU,oBAAA;EAPV;;;AAGF;EASE,WAAA,GAAc,WAAA;AAAA;;KAIJ,eAAA,IAAmB,KAAA;AAAA,UAEd,eAAA;EACf,OAAA,GAAU,eAAA;EAPe;EASzB,aAAA;AAAA;AAAA,UAGe,UAAA;EACf,OAAA,GACE,OAAA,UACA,KAAA,EAAO,WAAA,EACP,OAAA,GAAU,iBAAA;EAGZ,YAAA,GAAe,KAAA,WAAgB,OAAA,GAAU,mBAAA;EACzC,gBAAA,GAAmB,KAAA,WAAgB,OAAA,GAAU,mBAAA;EAC7C,kBAAA,GAAqB,MAAA,EAAQ,eAAA;AAAA;AAAA,KAGnB,WAAA;AAAA,KAEA,oBAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AttributeValue } from "@opentelemetry/api";
|
|
1
|
+
import { AttributeValue, SpanContext } from "@opentelemetry/api";
|
|
2
2
|
|
|
3
3
|
//#region src/api-logs/manager/types.d.ts
|
|
4
4
|
interface LogMessageOptions {
|
|
@@ -11,6 +11,11 @@ interface LogExceptionOptions {
|
|
|
11
11
|
attributes?: Record<string, AttributeValue | undefined>;
|
|
12
12
|
timestamp?: number;
|
|
13
13
|
handler?: ExceptionHandlerType;
|
|
14
|
+
/**
|
|
15
|
+
* Trace to attach when the exception is reported after its span ended, such as a failed request
|
|
16
|
+
* handled later (see `getResponseSpanContext`). Defaults to the active span.
|
|
17
|
+
*/
|
|
18
|
+
spanContext?: SpanContext;
|
|
14
19
|
}
|
|
15
20
|
/** Return false to drop the exception. */
|
|
16
21
|
type ExceptionFilter = (error: unknown) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/api-logs/manager/types.ts"],"mappings":";;;UAEiB,iBAAA;EACf,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,iBAAA;EACA,UAAA;AAAA;AAAA,UAGe,mBAAA;EACf,OAAA;EACA,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,SAAA;EACA,OAAA,GAAU,oBAAA;AAAA;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../../src/api-logs/manager/types.ts"],"mappings":";;;UAEiB,iBAAA;EACf,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,iBAAA;EACA,UAAA;AAAA;AAAA,UAGe,mBAAA;EACf,OAAA;EACA,UAAA,GAAa,MAAA,SAAe,cAAA;EAC5B,SAAA;EACA,OAAA,GAAU,oBAAA;EAPV;;;AAGF;EASE,WAAA,GAAc,WAAA;AAAA;;KAIJ,eAAA,IAAmB,KAAA;AAAA,UAEd,eAAA;EACf,OAAA,GAAU,eAAA;EAPe;EASzB,aAAA;AAAA;AAAA,UAGe,UAAA;EACf,OAAA,GACE,OAAA,UACA,KAAA,EAAO,WAAA,EACP,OAAA,GAAU,iBAAA;EAGZ,YAAA,GAAe,KAAA,WAAgB,OAAA,GAAU,mBAAA;EACzC,gBAAA,GAAmB,KAAA,WAAgB,OAAA,GAAU,mBAAA;EAC7C,kBAAA,GAAqB,MAAA,EAAQ,eAAA;AAAA;AAAA,KAGnB,WAAA;AAAA,KAEA,oBAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_managers_MXLUserSessionManager_utils_state = require("../../../managers/MXLUserSessionManager/utils/state.cjs");
|
|
2
3
|
//#region src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts
|
|
3
4
|
var NoOpUserSessionManager = class {
|
|
4
5
|
addBreadcrumb(_name) {}
|
|
@@ -49,6 +50,10 @@ var NoOpUserSessionManager = class {
|
|
|
49
50
|
nextReplayMetaVersion() {
|
|
50
51
|
return 0;
|
|
51
52
|
}
|
|
53
|
+
incrReplayCount(_key) {}
|
|
54
|
+
getReplayCounts() {
|
|
55
|
+
return require_managers_MXLUserSessionManager_utils_state.EMPTY_REPLAY_COUNTS;
|
|
56
|
+
}
|
|
52
57
|
_clearMaxDurationTimer() {}
|
|
53
58
|
_shutdown() {}
|
|
54
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoOpUserSessionManager.cjs","names":[],"sources":["../../../../src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts"],"sourcesContent":["import type { AnalyticsManagerInternal } from '../../../api-analytics/manager/types';\nimport type { ExtendedSpan } from '../../../api-traces/api/TraceAPI/types';\nimport type {\n EndSessionPartOptions,\n RolloverSessionPartOptions,\n StartSessionPartOptions,\n UserSessionManagerInternal,\n} from '../../../managers/MXLUserSessionManager/types';\nimport type { PropertyOptions, SessionPartStartedEvent } from '../types';\n\nexport class NoOpUserSessionManager implements UserSessionManagerInternal {\n public addBreadcrumb(_name: string): void {}\n\n public addProperty(\n _key: string,\n _value: string,\n _options?: PropertyOptions,\n ): void {}\n\n public removeProperty(_key: string): void {}\n\n public getUserSessionId(): string | null {\n return null;\n }\n\n public getPreviousUserSessionId(): string | null {\n return null;\n }\n\n public getUserSessionStartTime(): number | null {\n return null;\n }\n\n public endUserSession(): void {}\n\n public getUserSessionAttributes(): null {\n return null;\n }\n\n public getSessionPartProperties(): Record<string, string> {\n return {};\n }\n\n public getSessionPartId(): string | null {\n return null;\n }\n\n public getSessionPartIdAt(_timestampEpochMillis: number): string | null {\n return null;\n }\n\n public getSessionPartSpan(): ExtendedSpan | null {\n return null;\n }\n\n public startSessionPartInternal(_options: StartSessionPartOptions): void {}\n\n public endSessionPartInternal(_options: EndSessionPartOptions): void {}\n\n public rolloverSessionPartInternal(\n _options: RolloverSessionPartOptions,\n ): void {}\n\n public incrSessionPartCountForKey(_key: string): void {}\n\n public incrNextSessionPartCountForKey(_key: string): void {}\n\n public addSessionPartStartedListener(\n _listener: (event: SessionPartStartedEvent) => void,\n ): () => void {\n return () => {};\n }\n\n public addSessionPartEndedListener(_listener: () => void): () => void {\n return () => {};\n }\n\n public setTracerProvider(): void {}\n\n public setAnalyticsManager(_manager: AnalyticsManagerInternal | null): void {}\n\n public recordSDKStartupDuration(_duration: number): void {}\n\n public claimReplaySample(_sampleRate: number): boolean {\n return false;\n }\n\n public nextReplayMetaVersion(): number {\n return 0;\n }\n\n public _clearMaxDurationTimer(): void {}\n\n public _shutdown(): void {}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NoOpUserSessionManager.cjs","names":["EMPTY_REPLAY_COUNTS"],"sources":["../../../../src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts"],"sourcesContent":["import type { AnalyticsManagerInternal } from '../../../api-analytics/manager/types';\nimport type { ExtendedSpan } from '../../../api-traces/api/TraceAPI/types';\nimport type {\n EndSessionPartOptions,\n ReplayCounts,\n RolloverSessionPartOptions,\n StartSessionPartOptions,\n UserSessionManagerInternal,\n} from '../../../managers/MXLUserSessionManager/types';\nimport { EMPTY_REPLAY_COUNTS } from '../../../managers/MXLUserSessionManager/utils/state';\nimport type { PropertyOptions, SessionPartStartedEvent } from '../types';\n\nexport class NoOpUserSessionManager implements UserSessionManagerInternal {\n public addBreadcrumb(_name: string): void {}\n\n public addProperty(\n _key: string,\n _value: string,\n _options?: PropertyOptions,\n ): void {}\n\n public removeProperty(_key: string): void {}\n\n public getUserSessionId(): string | null {\n return null;\n }\n\n public getPreviousUserSessionId(): string | null {\n return null;\n }\n\n public getUserSessionStartTime(): number | null {\n return null;\n }\n\n public endUserSession(): void {}\n\n public getUserSessionAttributes(): null {\n return null;\n }\n\n public getSessionPartProperties(): Record<string, string> {\n return {};\n }\n\n public getSessionPartId(): string | null {\n return null;\n }\n\n public getSessionPartIdAt(_timestampEpochMillis: number): string | null {\n return null;\n }\n\n public getSessionPartSpan(): ExtendedSpan | null {\n return null;\n }\n\n public startSessionPartInternal(_options: StartSessionPartOptions): void {}\n\n public endSessionPartInternal(_options: EndSessionPartOptions): void {}\n\n public rolloverSessionPartInternal(\n _options: RolloverSessionPartOptions,\n ): void {}\n\n public incrSessionPartCountForKey(_key: string): void {}\n\n public incrNextSessionPartCountForKey(_key: string): void {}\n\n public addSessionPartStartedListener(\n _listener: (event: SessionPartStartedEvent) => void,\n ): () => void {\n return () => {};\n }\n\n public addSessionPartEndedListener(_listener: () => void): () => void {\n return () => {};\n }\n\n public setTracerProvider(): void {}\n\n public setAnalyticsManager(_manager: AnalyticsManagerInternal | null): void {}\n\n public recordSDKStartupDuration(_duration: number): void {}\n\n public claimReplaySample(_sampleRate: number): boolean {\n return false;\n }\n\n public nextReplayMetaVersion(): number {\n return 0;\n }\n\n public incrReplayCount(_key: keyof ReplayCounts): void {}\n\n public getReplayCounts(): ReplayCounts {\n return EMPTY_REPLAY_COUNTS;\n }\n\n public _clearMaxDurationTimer(): void {}\n\n public _shutdown(): void {}\n}\n"],"mappings":";;;AAYA,IAAa,yBAAb,MAA0E;CACxE,cAAqB,OAAqB;CAE1C,YACE,MACA,QACA,UACM;CAER,eAAsB,MAAoB;CAE1C,mBAAyC;AACvC,SAAO;;CAGT,2BAAiD;AAC/C,SAAO;;CAGT,0BAAgD;AAC9C,SAAO;;CAGT,iBAA8B;CAE9B,2BAAwC;AACtC,SAAO;;CAGT,2BAA0D;AACxD,SAAO,EAAE;;CAGX,mBAAyC;AACvC,SAAO;;CAGT,mBAA0B,uBAA8C;AACtE,SAAO;;CAGT,qBAAiD;AAC/C,SAAO;;CAGT,yBAAgC,UAAyC;CAEzE,uBAA8B,UAAuC;CAErE,4BACE,UACM;CAER,2BAAkC,MAAoB;CAEtD,+BAAsC,MAAoB;CAE1D,8BACE,WACY;AACZ,eAAa;;CAGf,4BAAmC,WAAmC;AACpE,eAAa;;CAGf,oBAAiC;CAEjC,oBAA2B,UAAiD;CAE5E,yBAAgC,WAAyB;CAEzD,kBAAyB,aAA8B;AACrD,SAAO;;CAGT,wBAAuC;AACrC,SAAO;;CAGT,gBAAuB,MAAgC;CAEvD,kBAAuC;AACrC,SAAOA,mDAAAA;;CAGT,yBAAsC;CAEtC,YAAyB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnalyticsManagerInternal } from "../../../api-analytics/manager/types.cjs";
|
|
2
2
|
import { ExtendedSpan } from "../../../api-traces/api/TraceAPI/types.cjs";
|
|
3
3
|
import { PropertyOptions, SessionPartStartedEvent } from "../types.cjs";
|
|
4
|
-
import { EndSessionPartOptions, RolloverSessionPartOptions, StartSessionPartOptions, UserSessionManagerInternal } from "../../../managers/MXLUserSessionManager/types.cjs";
|
|
4
|
+
import { EndSessionPartOptions, ReplayCounts, RolloverSessionPartOptions, StartSessionPartOptions, UserSessionManagerInternal } from "../../../managers/MXLUserSessionManager/types.cjs";
|
|
5
5
|
|
|
6
6
|
//#region src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts
|
|
7
7
|
declare class NoOpUserSessionManager implements UserSessionManagerInternal {
|
|
@@ -29,6 +29,8 @@ declare class NoOpUserSessionManager implements UserSessionManagerInternal {
|
|
|
29
29
|
recordSDKStartupDuration(_duration: number): void;
|
|
30
30
|
claimReplaySample(_sampleRate: number): boolean;
|
|
31
31
|
nextReplayMetaVersion(): number;
|
|
32
|
+
incrReplayCount(_key: keyof ReplayCounts): void;
|
|
33
|
+
getReplayCounts(): ReplayCounts;
|
|
32
34
|
_clearMaxDurationTimer(): void;
|
|
33
35
|
_shutdown(): void;
|
|
34
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoOpUserSessionManager.d.cts","names":[],"sources":["../../../../src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"NoOpUserSessionManager.d.cts","names":[],"sources":["../../../../src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts"],"mappings":";;;;;;cAYa,sBAAA,YAAkC,0BAAA;EACtC,aAAA,CAAc,KAAA;EAEd,WAAA,CACL,IAAA,UACA,MAAA,UACA,QAAA,GAAW,eAAA;EAGN,cAAA,CAAe,IAAA;EAEf,gBAAA,CAAA;EAIA,wBAAA,CAAA;EAIA,uBAAA,CAAA;EAIA,cAAA,CAAA;EAEA,wBAAA,CAAA;EAIA,wBAAA,CAAA,GAA4B,MAAA;EAI5B,gBAAA,CAAA;EAIA,kBAAA,CAAmB,qBAAA;EAInB,kBAAA,CAAA,GAAsB,YAAA;EAItB,wBAAA,CAAyB,QAAA,EAAU,uBAAA;EAEnC,sBAAA,CAAuB,QAAA,EAAU,qBAAA;EAEjC,2BAAA,CACL,QAAA,EAAU,0BAAA;EAGL,0BAAA,CAA2B,IAAA;EAE3B,8BAAA,CAA+B,IAAA;EAE/B,6BAAA,CACL,SAAA,GAAY,KAAA,EAAO,uBAAA;EAKd,2BAAA,CAA4B,SAAA;EAI5B,iBAAA,CAAA;EAEA,mBAAA,CAAoB,QAAA,EAAU,wBAAA;EAE9B,wBAAA,CAAyB,SAAA;EAEzB,iBAAA,CAAkB,WAAA;EAIlB,qBAAA,CAAA;EAIA,eAAA,CAAgB,IAAA,QAAY,YAAA;EAE5B,eAAA,CAAA,GAAmB,YAAA;EAInB,sBAAA,CAAA;EAEA,SAAA,CAAA;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnalyticsManagerInternal } from "../../../api-analytics/manager/types.js";
|
|
2
2
|
import { ExtendedSpan } from "../../../api-traces/api/TraceAPI/types.js";
|
|
3
3
|
import { PropertyOptions, SessionPartStartedEvent } from "../types.js";
|
|
4
|
-
import { EndSessionPartOptions, RolloverSessionPartOptions, StartSessionPartOptions, UserSessionManagerInternal } from "../../../managers/MXLUserSessionManager/types.js";
|
|
4
|
+
import { EndSessionPartOptions, ReplayCounts, RolloverSessionPartOptions, StartSessionPartOptions, UserSessionManagerInternal } from "../../../managers/MXLUserSessionManager/types.js";
|
|
5
5
|
|
|
6
6
|
//#region src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.d.ts
|
|
7
7
|
declare class NoOpUserSessionManager implements UserSessionManagerInternal {
|
|
@@ -29,6 +29,8 @@ declare class NoOpUserSessionManager implements UserSessionManagerInternal {
|
|
|
29
29
|
recordSDKStartupDuration(_duration: number): void;
|
|
30
30
|
claimReplaySample(_sampleRate: number): boolean;
|
|
31
31
|
nextReplayMetaVersion(): number;
|
|
32
|
+
incrReplayCount(_key: keyof ReplayCounts): void;
|
|
33
|
+
getReplayCounts(): ReplayCounts;
|
|
32
34
|
_clearMaxDurationTimer(): void;
|
|
33
35
|
_shutdown(): void;
|
|
34
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoOpUserSessionManager.d.ts","names":[],"sources":["../../../../src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"NoOpUserSessionManager.d.ts","names":[],"sources":["../../../../src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts"],"mappings":";;;;;;cAYa,sBAAA,YAAkC,0BAAA;EACtC,aAAA,CAAc,KAAA;EAEd,WAAA,CACL,IAAA,UACA,MAAA,UACA,QAAA,GAAW,eAAA;EAGN,cAAA,CAAe,IAAA;EAEf,gBAAA,CAAA;EAIA,wBAAA,CAAA;EAIA,uBAAA,CAAA;EAIA,cAAA,CAAA;EAEA,wBAAA,CAAA;EAIA,wBAAA,CAAA,GAA4B,MAAA;EAI5B,gBAAA,CAAA;EAIA,kBAAA,CAAmB,qBAAA;EAInB,kBAAA,CAAA,GAAsB,YAAA;EAItB,wBAAA,CAAyB,QAAA,EAAU,uBAAA;EAEnC,sBAAA,CAAuB,QAAA,EAAU,qBAAA;EAEjC,2BAAA,CACL,QAAA,EAAU,0BAAA;EAGL,0BAAA,CAA2B,IAAA;EAE3B,8BAAA,CAA+B,IAAA;EAE/B,6BAAA,CACL,SAAA,GAAY,KAAA,EAAO,uBAAA;EAKd,2BAAA,CAA4B,SAAA;EAI5B,iBAAA,CAAA;EAEA,mBAAA,CAAoB,QAAA,EAAU,wBAAA;EAE9B,wBAAA,CAAyB,SAAA;EAEzB,iBAAA,CAAkB,WAAA;EAIlB,qBAAA,CAAA;EAIA,eAAA,CAAgB,IAAA,QAAY,YAAA;EAE5B,eAAA,CAAA,GAAmB,YAAA;EAInB,sBAAA,CAAA;EAEA,SAAA,CAAA;AAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EMPTY_REPLAY_COUNTS } from "../../../managers/MXLUserSessionManager/utils/state.js";
|
|
1
2
|
//#region src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts
|
|
2
3
|
var NoOpUserSessionManager = class {
|
|
3
4
|
addBreadcrumb(_name) {}
|
|
@@ -48,6 +49,10 @@ var NoOpUserSessionManager = class {
|
|
|
48
49
|
nextReplayMetaVersion() {
|
|
49
50
|
return 0;
|
|
50
51
|
}
|
|
52
|
+
incrReplayCount(_key) {}
|
|
53
|
+
getReplayCounts() {
|
|
54
|
+
return EMPTY_REPLAY_COUNTS;
|
|
55
|
+
}
|
|
51
56
|
_clearMaxDurationTimer() {}
|
|
52
57
|
_shutdown() {}
|
|
53
58
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoOpUserSessionManager.js","names":[],"sources":["../../../../src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts"],"sourcesContent":["import type { AnalyticsManagerInternal } from '../../../api-analytics/manager/types';\nimport type { ExtendedSpan } from '../../../api-traces/api/TraceAPI/types';\nimport type {\n EndSessionPartOptions,\n RolloverSessionPartOptions,\n StartSessionPartOptions,\n UserSessionManagerInternal,\n} from '../../../managers/MXLUserSessionManager/types';\nimport type { PropertyOptions, SessionPartStartedEvent } from '../types';\n\nexport class NoOpUserSessionManager implements UserSessionManagerInternal {\n public addBreadcrumb(_name: string): void {}\n\n public addProperty(\n _key: string,\n _value: string,\n _options?: PropertyOptions,\n ): void {}\n\n public removeProperty(_key: string): void {}\n\n public getUserSessionId(): string | null {\n return null;\n }\n\n public getPreviousUserSessionId(): string | null {\n return null;\n }\n\n public getUserSessionStartTime(): number | null {\n return null;\n }\n\n public endUserSession(): void {}\n\n public getUserSessionAttributes(): null {\n return null;\n }\n\n public getSessionPartProperties(): Record<string, string> {\n return {};\n }\n\n public getSessionPartId(): string | null {\n return null;\n }\n\n public getSessionPartIdAt(_timestampEpochMillis: number): string | null {\n return null;\n }\n\n public getSessionPartSpan(): ExtendedSpan | null {\n return null;\n }\n\n public startSessionPartInternal(_options: StartSessionPartOptions): void {}\n\n public endSessionPartInternal(_options: EndSessionPartOptions): void {}\n\n public rolloverSessionPartInternal(\n _options: RolloverSessionPartOptions,\n ): void {}\n\n public incrSessionPartCountForKey(_key: string): void {}\n\n public incrNextSessionPartCountForKey(_key: string): void {}\n\n public addSessionPartStartedListener(\n _listener: (event: SessionPartStartedEvent) => void,\n ): () => void {\n return () => {};\n }\n\n public addSessionPartEndedListener(_listener: () => void): () => void {\n return () => {};\n }\n\n public setTracerProvider(): void {}\n\n public setAnalyticsManager(_manager: AnalyticsManagerInternal | null): void {}\n\n public recordSDKStartupDuration(_duration: number): void {}\n\n public claimReplaySample(_sampleRate: number): boolean {\n return false;\n }\n\n public nextReplayMetaVersion(): number {\n return 0;\n }\n\n public _clearMaxDurationTimer(): void {}\n\n public _shutdown(): void {}\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NoOpUserSessionManager.js","names":[],"sources":["../../../../src/api-sessions/manager/NoOpUserSessionManager/NoOpUserSessionManager.ts"],"sourcesContent":["import type { AnalyticsManagerInternal } from '../../../api-analytics/manager/types';\nimport type { ExtendedSpan } from '../../../api-traces/api/TraceAPI/types';\nimport type {\n EndSessionPartOptions,\n ReplayCounts,\n RolloverSessionPartOptions,\n StartSessionPartOptions,\n UserSessionManagerInternal,\n} from '../../../managers/MXLUserSessionManager/types';\nimport { EMPTY_REPLAY_COUNTS } from '../../../managers/MXLUserSessionManager/utils/state';\nimport type { PropertyOptions, SessionPartStartedEvent } from '../types';\n\nexport class NoOpUserSessionManager implements UserSessionManagerInternal {\n public addBreadcrumb(_name: string): void {}\n\n public addProperty(\n _key: string,\n _value: string,\n _options?: PropertyOptions,\n ): void {}\n\n public removeProperty(_key: string): void {}\n\n public getUserSessionId(): string | null {\n return null;\n }\n\n public getPreviousUserSessionId(): string | null {\n return null;\n }\n\n public getUserSessionStartTime(): number | null {\n return null;\n }\n\n public endUserSession(): void {}\n\n public getUserSessionAttributes(): null {\n return null;\n }\n\n public getSessionPartProperties(): Record<string, string> {\n return {};\n }\n\n public getSessionPartId(): string | null {\n return null;\n }\n\n public getSessionPartIdAt(_timestampEpochMillis: number): string | null {\n return null;\n }\n\n public getSessionPartSpan(): ExtendedSpan | null {\n return null;\n }\n\n public startSessionPartInternal(_options: StartSessionPartOptions): void {}\n\n public endSessionPartInternal(_options: EndSessionPartOptions): void {}\n\n public rolloverSessionPartInternal(\n _options: RolloverSessionPartOptions,\n ): void {}\n\n public incrSessionPartCountForKey(_key: string): void {}\n\n public incrNextSessionPartCountForKey(_key: string): void {}\n\n public addSessionPartStartedListener(\n _listener: (event: SessionPartStartedEvent) => void,\n ): () => void {\n return () => {};\n }\n\n public addSessionPartEndedListener(_listener: () => void): () => void {\n return () => {};\n }\n\n public setTracerProvider(): void {}\n\n public setAnalyticsManager(_manager: AnalyticsManagerInternal | null): void {}\n\n public recordSDKStartupDuration(_duration: number): void {}\n\n public claimReplaySample(_sampleRate: number): boolean {\n return false;\n }\n\n public nextReplayMetaVersion(): number {\n return 0;\n }\n\n public incrReplayCount(_key: keyof ReplayCounts): void {}\n\n public getReplayCounts(): ReplayCounts {\n return EMPTY_REPLAY_COUNTS;\n }\n\n public _clearMaxDurationTimer(): void {}\n\n public _shutdown(): void {}\n}\n"],"mappings":";;AAYA,IAAa,yBAAb,MAA0E;CACxE,cAAqB,OAAqB;CAE1C,YACE,MACA,QACA,UACM;CAER,eAAsB,MAAoB;CAE1C,mBAAyC;AACvC,SAAO;;CAGT,2BAAiD;AAC/C,SAAO;;CAGT,0BAAgD;AAC9C,SAAO;;CAGT,iBAA8B;CAE9B,2BAAwC;AACtC,SAAO;;CAGT,2BAA0D;AACxD,SAAO,EAAE;;CAGX,mBAAyC;AACvC,SAAO;;CAGT,mBAA0B,uBAA8C;AACtE,SAAO;;CAGT,qBAAiD;AAC/C,SAAO;;CAGT,yBAAgC,UAAyC;CAEzE,uBAA8B,UAAuC;CAErE,4BACE,UACM;CAER,2BAAkC,MAAoB;CAEtD,+BAAsC,MAAoB;CAE1D,8BACE,WACY;AACZ,eAAa;;CAGf,4BAAmC,WAAmC;AACpE,eAAa;;CAGf,oBAAiC;CAEjC,oBAA2B,UAAiD;CAE5E,yBAAgC,WAAyB;CAEzD,kBAAyB,aAA8B;AACrD,SAAO;;CAGT,wBAAuC;AACrC,SAAO;;CAGT,gBAAuB,MAAgC;CAEvD,kBAAuC;AACrC,SAAO;;CAGT,yBAAsC;CAEtC,YAAyB"}
|
|
@@ -83,6 +83,12 @@ var ProxyUserSessionManager = class {
|
|
|
83
83
|
nextReplayMetaVersion() {
|
|
84
84
|
return this.getDelegate().nextReplayMetaVersion();
|
|
85
85
|
}
|
|
86
|
+
incrReplayCount(key) {
|
|
87
|
+
this.getDelegate().incrReplayCount(key);
|
|
88
|
+
}
|
|
89
|
+
getReplayCounts() {
|
|
90
|
+
return this.getDelegate().getReplayCounts();
|
|
91
|
+
}
|
|
86
92
|
_clearMaxDurationTimer() {
|
|
87
93
|
this.getDelegate()._clearMaxDurationTimer();
|
|
88
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProxyUserSessionManager.cjs","names":["NoOpUserSessionManager"],"sources":["../../../../src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.ts"],"sourcesContent":["import type { TracerProvider } from '@opentelemetry/api';\nimport type { AnalyticsManagerInternal } from '../../../api-analytics/manager/types';\nimport type { ExtendedSpan } from '../../../api-traces/api/TraceAPI/types';\nimport type {\n EndSessionPartOptions,\n RolloverSessionPartOptions,\n StartSessionPartOptions,\n UserSessionAttributes,\n UserSessionManagerInternal,\n} from '../../../managers/MXLUserSessionManager/types';\nimport { NoOpUserSessionManager } from '../NoOpUserSessionManager/NoOpUserSessionManager';\nimport type { PropertyOptions, SessionPartStartedEvent } from '../types';\n\nconst NOOP_USER_SESSION_MANAGER = new NoOpUserSessionManager();\n\nexport class ProxyUserSessionManager implements UserSessionManagerInternal {\n private _delegate?: UserSessionManagerInternal;\n\n public getDelegate(): UserSessionManagerInternal {\n return this._delegate ?? NOOP_USER_SESSION_MANAGER;\n }\n\n public setDelegate(delegate: UserSessionManagerInternal): void {\n const previous = this._delegate;\n if (previous && previous !== delegate) {\n previous._shutdown();\n }\n this._delegate = delegate;\n }\n\n public addBreadcrumb(name: string): void {\n this.getDelegate().addBreadcrumb(name);\n }\n\n public addProperty(\n key: string,\n value: string,\n options?: PropertyOptions,\n ): void {\n this.getDelegate().addProperty(key, value, options);\n }\n\n public removeProperty(key: string): void {\n this.getDelegate().removeProperty(key);\n }\n\n public getUserSessionId(): string | null {\n return this.getDelegate().getUserSessionId();\n }\n\n public getPreviousUserSessionId(): string | null {\n return this.getDelegate().getPreviousUserSessionId();\n }\n\n public getUserSessionStartTime(): number | null {\n return this.getDelegate().getUserSessionStartTime();\n }\n\n public endUserSession(): void {\n this.getDelegate().endUserSession();\n }\n\n public getUserSessionAttributes(): UserSessionAttributes | null {\n return this.getDelegate().getUserSessionAttributes();\n }\n\n public getSessionPartProperties(): Record<string, string> {\n return this.getDelegate().getSessionPartProperties();\n }\n\n public getSessionPartId(): string | null {\n return this.getDelegate().getSessionPartId();\n }\n\n public getSessionPartIdAt(timestampEpochMillis: number): string | null {\n return this.getDelegate().getSessionPartIdAt(timestampEpochMillis);\n }\n\n public getSessionPartSpan(): ExtendedSpan | null {\n return this.getDelegate().getSessionPartSpan();\n }\n\n public startSessionPartInternal(options: StartSessionPartOptions): void {\n this.getDelegate().startSessionPartInternal(options);\n }\n\n public endSessionPartInternal(options: EndSessionPartOptions): void {\n this.getDelegate().endSessionPartInternal(options);\n }\n\n public rolloverSessionPartInternal(\n options: RolloverSessionPartOptions,\n ): void {\n this.getDelegate().rolloverSessionPartInternal(options);\n }\n\n public incrSessionPartCountForKey(key: string): void {\n this.getDelegate().incrSessionPartCountForKey(key);\n }\n\n public incrNextSessionPartCountForKey(key: string): void {\n this.getDelegate().incrNextSessionPartCountForKey(key);\n }\n\n public addSessionPartStartedListener(\n listener: (event: SessionPartStartedEvent) => void,\n ): () => void {\n return this.getDelegate().addSessionPartStartedListener(listener);\n }\n\n public addSessionPartEndedListener(listener: () => void): () => void {\n return this.getDelegate().addSessionPartEndedListener(listener);\n }\n\n public setTracerProvider(tracerProvider: TracerProvider): void {\n this.getDelegate().setTracerProvider(tracerProvider);\n }\n\n public setAnalyticsManager(manager: AnalyticsManagerInternal | null): void {\n this.getDelegate().setAnalyticsManager(manager);\n }\n\n public recordSDKStartupDuration(duration: number): void {\n this.getDelegate().recordSDKStartupDuration(duration);\n }\n\n public claimReplaySample(sampleRate: number): boolean {\n return this.getDelegate().claimReplaySample(sampleRate);\n }\n\n public nextReplayMetaVersion(): number {\n return this.getDelegate().nextReplayMetaVersion();\n }\n\n public _clearMaxDurationTimer(): void {\n this.getDelegate()._clearMaxDurationTimer();\n }\n\n public _shutdown(): void {\n this.getDelegate()._shutdown();\n }\n}\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ProxyUserSessionManager.cjs","names":["NoOpUserSessionManager"],"sources":["../../../../src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.ts"],"sourcesContent":["import type { TracerProvider } from '@opentelemetry/api';\nimport type { AnalyticsManagerInternal } from '../../../api-analytics/manager/types';\nimport type { ExtendedSpan } from '../../../api-traces/api/TraceAPI/types';\nimport type {\n EndSessionPartOptions,\n ReplayCounts,\n RolloverSessionPartOptions,\n StartSessionPartOptions,\n UserSessionAttributes,\n UserSessionManagerInternal,\n} from '../../../managers/MXLUserSessionManager/types';\nimport { NoOpUserSessionManager } from '../NoOpUserSessionManager/NoOpUserSessionManager';\nimport type { PropertyOptions, SessionPartStartedEvent } from '../types';\n\nconst NOOP_USER_SESSION_MANAGER = new NoOpUserSessionManager();\n\nexport class ProxyUserSessionManager implements UserSessionManagerInternal {\n private _delegate?: UserSessionManagerInternal;\n\n public getDelegate(): UserSessionManagerInternal {\n return this._delegate ?? NOOP_USER_SESSION_MANAGER;\n }\n\n public setDelegate(delegate: UserSessionManagerInternal): void {\n const previous = this._delegate;\n if (previous && previous !== delegate) {\n previous._shutdown();\n }\n this._delegate = delegate;\n }\n\n public addBreadcrumb(name: string): void {\n this.getDelegate().addBreadcrumb(name);\n }\n\n public addProperty(\n key: string,\n value: string,\n options?: PropertyOptions,\n ): void {\n this.getDelegate().addProperty(key, value, options);\n }\n\n public removeProperty(key: string): void {\n this.getDelegate().removeProperty(key);\n }\n\n public getUserSessionId(): string | null {\n return this.getDelegate().getUserSessionId();\n }\n\n public getPreviousUserSessionId(): string | null {\n return this.getDelegate().getPreviousUserSessionId();\n }\n\n public getUserSessionStartTime(): number | null {\n return this.getDelegate().getUserSessionStartTime();\n }\n\n public endUserSession(): void {\n this.getDelegate().endUserSession();\n }\n\n public getUserSessionAttributes(): UserSessionAttributes | null {\n return this.getDelegate().getUserSessionAttributes();\n }\n\n public getSessionPartProperties(): Record<string, string> {\n return this.getDelegate().getSessionPartProperties();\n }\n\n public getSessionPartId(): string | null {\n return this.getDelegate().getSessionPartId();\n }\n\n public getSessionPartIdAt(timestampEpochMillis: number): string | null {\n return this.getDelegate().getSessionPartIdAt(timestampEpochMillis);\n }\n\n public getSessionPartSpan(): ExtendedSpan | null {\n return this.getDelegate().getSessionPartSpan();\n }\n\n public startSessionPartInternal(options: StartSessionPartOptions): void {\n this.getDelegate().startSessionPartInternal(options);\n }\n\n public endSessionPartInternal(options: EndSessionPartOptions): void {\n this.getDelegate().endSessionPartInternal(options);\n }\n\n public rolloverSessionPartInternal(\n options: RolloverSessionPartOptions,\n ): void {\n this.getDelegate().rolloverSessionPartInternal(options);\n }\n\n public incrSessionPartCountForKey(key: string): void {\n this.getDelegate().incrSessionPartCountForKey(key);\n }\n\n public incrNextSessionPartCountForKey(key: string): void {\n this.getDelegate().incrNextSessionPartCountForKey(key);\n }\n\n public addSessionPartStartedListener(\n listener: (event: SessionPartStartedEvent) => void,\n ): () => void {\n return this.getDelegate().addSessionPartStartedListener(listener);\n }\n\n public addSessionPartEndedListener(listener: () => void): () => void {\n return this.getDelegate().addSessionPartEndedListener(listener);\n }\n\n public setTracerProvider(tracerProvider: TracerProvider): void {\n this.getDelegate().setTracerProvider(tracerProvider);\n }\n\n public setAnalyticsManager(manager: AnalyticsManagerInternal | null): void {\n this.getDelegate().setAnalyticsManager(manager);\n }\n\n public recordSDKStartupDuration(duration: number): void {\n this.getDelegate().recordSDKStartupDuration(duration);\n }\n\n public claimReplaySample(sampleRate: number): boolean {\n return this.getDelegate().claimReplaySample(sampleRate);\n }\n\n public nextReplayMetaVersion(): number {\n return this.getDelegate().nextReplayMetaVersion();\n }\n\n public incrReplayCount(key: keyof ReplayCounts): void {\n this.getDelegate().incrReplayCount(key);\n }\n\n public getReplayCounts(): ReplayCounts {\n return this.getDelegate().getReplayCounts();\n }\n\n public _clearMaxDurationTimer(): void {\n this.getDelegate()._clearMaxDurationTimer();\n }\n\n public _shutdown(): void {\n this.getDelegate()._shutdown();\n }\n}\n"],"mappings":";;AAcA,MAAM,4BAA4B,oEAAIA,EAAAA,wBAAwB;AAE9D,IAAa,0BAAb,MAA2E;CACzE;CAEA,cAAiD;AAC/C,SAAO,KAAK,aAAa;;CAG3B,YAAmB,UAA4C;EAC7D,MAAM,WAAW,KAAK;AACtB,MAAI,YAAY,aAAa,SAC3B,UAAS,WAAW;AAEtB,OAAK,YAAY;;CAGnB,cAAqB,MAAoB;AACvC,OAAK,aAAa,CAAC,cAAc,KAAK;;CAGxC,YACE,KACA,OACA,SACM;AACN,OAAK,aAAa,CAAC,YAAY,KAAK,OAAO,QAAQ;;CAGrD,eAAsB,KAAmB;AACvC,OAAK,aAAa,CAAC,eAAe,IAAI;;CAGxC,mBAAyC;AACvC,SAAO,KAAK,aAAa,CAAC,kBAAkB;;CAG9C,2BAAiD;AAC/C,SAAO,KAAK,aAAa,CAAC,0BAA0B;;CAGtD,0BAAgD;AAC9C,SAAO,KAAK,aAAa,CAAC,yBAAyB;;CAGrD,iBAA8B;AAC5B,OAAK,aAAa,CAAC,gBAAgB;;CAGrC,2BAAgE;AAC9D,SAAO,KAAK,aAAa,CAAC,0BAA0B;;CAGtD,2BAA0D;AACxD,SAAO,KAAK,aAAa,CAAC,0BAA0B;;CAGtD,mBAAyC;AACvC,SAAO,KAAK,aAAa,CAAC,kBAAkB;;CAG9C,mBAA0B,sBAA6C;AACrE,SAAO,KAAK,aAAa,CAAC,mBAAmB,qBAAqB;;CAGpE,qBAAiD;AAC/C,SAAO,KAAK,aAAa,CAAC,oBAAoB;;CAGhD,yBAAgC,SAAwC;AACtE,OAAK,aAAa,CAAC,yBAAyB,QAAQ;;CAGtD,uBAA8B,SAAsC;AAClE,OAAK,aAAa,CAAC,uBAAuB,QAAQ;;CAGpD,4BACE,SACM;AACN,OAAK,aAAa,CAAC,4BAA4B,QAAQ;;CAGzD,2BAAkC,KAAmB;AACnD,OAAK,aAAa,CAAC,2BAA2B,IAAI;;CAGpD,+BAAsC,KAAmB;AACvD,OAAK,aAAa,CAAC,+BAA+B,IAAI;;CAGxD,8BACE,UACY;AACZ,SAAO,KAAK,aAAa,CAAC,8BAA8B,SAAS;;CAGnE,4BAAmC,UAAkC;AACnE,SAAO,KAAK,aAAa,CAAC,4BAA4B,SAAS;;CAGjE,kBAAyB,gBAAsC;AAC7D,OAAK,aAAa,CAAC,kBAAkB,eAAe;;CAGtD,oBAA2B,SAAgD;AACzE,OAAK,aAAa,CAAC,oBAAoB,QAAQ;;CAGjD,yBAAgC,UAAwB;AACtD,OAAK,aAAa,CAAC,yBAAyB,SAAS;;CAGvD,kBAAyB,YAA6B;AACpD,SAAO,KAAK,aAAa,CAAC,kBAAkB,WAAW;;CAGzD,wBAAuC;AACrC,SAAO,KAAK,aAAa,CAAC,uBAAuB;;CAGnD,gBAAuB,KAA+B;AACpD,OAAK,aAAa,CAAC,gBAAgB,IAAI;;CAGzC,kBAAuC;AACrC,SAAO,KAAK,aAAa,CAAC,iBAAiB;;CAG7C,yBAAsC;AACpC,OAAK,aAAa,CAAC,wBAAwB;;CAG7C,YAAyB;AACvB,OAAK,aAAa,CAAC,WAAW"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnalyticsManagerInternal } from "../../../api-analytics/manager/types.cjs";
|
|
2
2
|
import { ExtendedSpan } from "../../../api-traces/api/TraceAPI/types.cjs";
|
|
3
3
|
import { PropertyOptions, SessionPartStartedEvent } from "../types.cjs";
|
|
4
|
-
import { EndSessionPartOptions, RolloverSessionPartOptions, StartSessionPartOptions, UserSessionAttributes, UserSessionManagerInternal } from "../../../managers/MXLUserSessionManager/types.cjs";
|
|
4
|
+
import { EndSessionPartOptions, ReplayCounts, RolloverSessionPartOptions, StartSessionPartOptions, UserSessionAttributes, UserSessionManagerInternal } from "../../../managers/MXLUserSessionManager/types.cjs";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
7
|
//#region src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts
|
|
@@ -33,6 +33,8 @@ declare class ProxyUserSessionManager implements UserSessionManagerInternal {
|
|
|
33
33
|
recordSDKStartupDuration(duration: number): void;
|
|
34
34
|
claimReplaySample(sampleRate: number): boolean;
|
|
35
35
|
nextReplayMetaVersion(): number;
|
|
36
|
+
incrReplayCount(key: keyof ReplayCounts): void;
|
|
37
|
+
getReplayCounts(): ReplayCounts;
|
|
36
38
|
_clearMaxDurationTimer(): void;
|
|
37
39
|
_shutdown(): void;
|
|
38
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProxyUserSessionManager.d.cts","names":[],"sources":["../../../../src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"ProxyUserSessionManager.d.cts","names":[],"sources":["../../../../src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.ts"],"mappings":";;;;;;;cAgBa,uBAAA,YAAmC,0BAAA;EAAA,QACtC,SAAA;EAED,WAAA,CAAA,GAAe,0BAAA;EAIf,WAAA,CAAY,QAAA,EAAU,0BAAA;EAQtB,aAAA,CAAc,IAAA;EAId,WAAA,CACL,GAAA,UACA,KAAA,UACA,OAAA,GAAU,eAAA;EAKL,cAAA,CAAe,GAAA;EAIf,gBAAA,CAAA;EAIA,wBAAA,CAAA;EAIA,uBAAA,CAAA;EAIA,cAAA,CAAA;EAIA,wBAAA,CAAA,GAA4B,qBAAA;EAI5B,wBAAA,CAAA,GAA4B,MAAA;EAI5B,gBAAA,CAAA;EAIA,kBAAA,CAAmB,oBAAA;EAInB,kBAAA,CAAA,GAAsB,YAAA;EAItB,wBAAA,CAAyB,OAAA,EAAS,uBAAA;EAIlC,sBAAA,CAAuB,OAAA,EAAS,qBAAA;EAIhC,2BAAA,CACL,OAAA,EAAS,0BAAA;EAKJ,0BAAA,CAA2B,GAAA;EAI3B,8BAAA,CAA+B,GAAA;EAI/B,6BAAA,CACL,QAAA,GAAW,KAAA,EAAO,uBAAA;EAKb,2BAAA,CAA4B,QAAA;EAI5B,iBAAA,CAAkB,cAAA,EAAgB,cAAA;EAIlC,mBAAA,CAAoB,OAAA,EAAS,wBAAA;EAI7B,wBAAA,CAAyB,QAAA;EAIzB,iBAAA,CAAkB,UAAA;EAIlB,qBAAA,CAAA;EAIA,eAAA,CAAgB,GAAA,QAAW,YAAA;EAI3B,eAAA,CAAA,GAAmB,YAAA;EAInB,sBAAA,CAAA;EAIA,SAAA,CAAA;AAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AnalyticsManagerInternal } from "../../../api-analytics/manager/types.js";
|
|
2
2
|
import { ExtendedSpan } from "../../../api-traces/api/TraceAPI/types.js";
|
|
3
3
|
import { PropertyOptions, SessionPartStartedEvent } from "../types.js";
|
|
4
|
-
import { EndSessionPartOptions, RolloverSessionPartOptions, StartSessionPartOptions, UserSessionAttributes, UserSessionManagerInternal } from "../../../managers/MXLUserSessionManager/types.js";
|
|
4
|
+
import { EndSessionPartOptions, ReplayCounts, RolloverSessionPartOptions, StartSessionPartOptions, UserSessionAttributes, UserSessionManagerInternal } from "../../../managers/MXLUserSessionManager/types.js";
|
|
5
5
|
import { TracerProvider } from "@opentelemetry/api";
|
|
6
6
|
|
|
7
7
|
//#region src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.d.ts
|
|
@@ -33,6 +33,8 @@ declare class ProxyUserSessionManager implements UserSessionManagerInternal {
|
|
|
33
33
|
recordSDKStartupDuration(duration: number): void;
|
|
34
34
|
claimReplaySample(sampleRate: number): boolean;
|
|
35
35
|
nextReplayMetaVersion(): number;
|
|
36
|
+
incrReplayCount(key: keyof ReplayCounts): void;
|
|
37
|
+
getReplayCounts(): ReplayCounts;
|
|
36
38
|
_clearMaxDurationTimer(): void;
|
|
37
39
|
_shutdown(): void;
|
|
38
40
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProxyUserSessionManager.d.ts","names":[],"sources":["../../../../src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"ProxyUserSessionManager.d.ts","names":[],"sources":["../../../../src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.ts"],"mappings":";;;;;;;cAgBa,uBAAA,YAAmC,0BAAA;EAAA,QACtC,SAAA;EAED,WAAA,CAAA,GAAe,0BAAA;EAIf,WAAA,CAAY,QAAA,EAAU,0BAAA;EAQtB,aAAA,CAAc,IAAA;EAId,WAAA,CACL,GAAA,UACA,KAAA,UACA,OAAA,GAAU,eAAA;EAKL,cAAA,CAAe,GAAA;EAIf,gBAAA,CAAA;EAIA,wBAAA,CAAA;EAIA,uBAAA,CAAA;EAIA,cAAA,CAAA;EAIA,wBAAA,CAAA,GAA4B,qBAAA;EAI5B,wBAAA,CAAA,GAA4B,MAAA;EAI5B,gBAAA,CAAA;EAIA,kBAAA,CAAmB,oBAAA;EAInB,kBAAA,CAAA,GAAsB,YAAA;EAItB,wBAAA,CAAyB,OAAA,EAAS,uBAAA;EAIlC,sBAAA,CAAuB,OAAA,EAAS,qBAAA;EAIhC,2BAAA,CACL,OAAA,EAAS,0BAAA;EAKJ,0BAAA,CAA2B,GAAA;EAI3B,8BAAA,CAA+B,GAAA;EAI/B,6BAAA,CACL,QAAA,GAAW,KAAA,EAAO,uBAAA;EAKb,2BAAA,CAA4B,QAAA;EAI5B,iBAAA,CAAkB,cAAA,EAAgB,cAAA;EAIlC,mBAAA,CAAoB,OAAA,EAAS,wBAAA;EAI7B,wBAAA,CAAyB,QAAA;EAIzB,iBAAA,CAAkB,UAAA;EAIlB,qBAAA,CAAA;EAIA,eAAA,CAAgB,GAAA,QAAW,YAAA;EAI3B,eAAA,CAAA,GAAmB,YAAA;EAInB,sBAAA,CAAA;EAIA,SAAA,CAAA;AAAA"}
|
|
@@ -83,6 +83,12 @@ var ProxyUserSessionManager = class {
|
|
|
83
83
|
nextReplayMetaVersion() {
|
|
84
84
|
return this.getDelegate().nextReplayMetaVersion();
|
|
85
85
|
}
|
|
86
|
+
incrReplayCount(key) {
|
|
87
|
+
this.getDelegate().incrReplayCount(key);
|
|
88
|
+
}
|
|
89
|
+
getReplayCounts() {
|
|
90
|
+
return this.getDelegate().getReplayCounts();
|
|
91
|
+
}
|
|
86
92
|
_clearMaxDurationTimer() {
|
|
87
93
|
this.getDelegate()._clearMaxDurationTimer();
|
|
88
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProxyUserSessionManager.js","names":[],"sources":["../../../../src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.ts"],"sourcesContent":["import type { TracerProvider } from '@opentelemetry/api';\nimport type { AnalyticsManagerInternal } from '../../../api-analytics/manager/types';\nimport type { ExtendedSpan } from '../../../api-traces/api/TraceAPI/types';\nimport type {\n EndSessionPartOptions,\n RolloverSessionPartOptions,\n StartSessionPartOptions,\n UserSessionAttributes,\n UserSessionManagerInternal,\n} from '../../../managers/MXLUserSessionManager/types';\nimport { NoOpUserSessionManager } from '../NoOpUserSessionManager/NoOpUserSessionManager';\nimport type { PropertyOptions, SessionPartStartedEvent } from '../types';\n\nconst NOOP_USER_SESSION_MANAGER = new NoOpUserSessionManager();\n\nexport class ProxyUserSessionManager implements UserSessionManagerInternal {\n private _delegate?: UserSessionManagerInternal;\n\n public getDelegate(): UserSessionManagerInternal {\n return this._delegate ?? NOOP_USER_SESSION_MANAGER;\n }\n\n public setDelegate(delegate: UserSessionManagerInternal): void {\n const previous = this._delegate;\n if (previous && previous !== delegate) {\n previous._shutdown();\n }\n this._delegate = delegate;\n }\n\n public addBreadcrumb(name: string): void {\n this.getDelegate().addBreadcrumb(name);\n }\n\n public addProperty(\n key: string,\n value: string,\n options?: PropertyOptions,\n ): void {\n this.getDelegate().addProperty(key, value, options);\n }\n\n public removeProperty(key: string): void {\n this.getDelegate().removeProperty(key);\n }\n\n public getUserSessionId(): string | null {\n return this.getDelegate().getUserSessionId();\n }\n\n public getPreviousUserSessionId(): string | null {\n return this.getDelegate().getPreviousUserSessionId();\n }\n\n public getUserSessionStartTime(): number | null {\n return this.getDelegate().getUserSessionStartTime();\n }\n\n public endUserSession(): void {\n this.getDelegate().endUserSession();\n }\n\n public getUserSessionAttributes(): UserSessionAttributes | null {\n return this.getDelegate().getUserSessionAttributes();\n }\n\n public getSessionPartProperties(): Record<string, string> {\n return this.getDelegate().getSessionPartProperties();\n }\n\n public getSessionPartId(): string | null {\n return this.getDelegate().getSessionPartId();\n }\n\n public getSessionPartIdAt(timestampEpochMillis: number): string | null {\n return this.getDelegate().getSessionPartIdAt(timestampEpochMillis);\n }\n\n public getSessionPartSpan(): ExtendedSpan | null {\n return this.getDelegate().getSessionPartSpan();\n }\n\n public startSessionPartInternal(options: StartSessionPartOptions): void {\n this.getDelegate().startSessionPartInternal(options);\n }\n\n public endSessionPartInternal(options: EndSessionPartOptions): void {\n this.getDelegate().endSessionPartInternal(options);\n }\n\n public rolloverSessionPartInternal(\n options: RolloverSessionPartOptions,\n ): void {\n this.getDelegate().rolloverSessionPartInternal(options);\n }\n\n public incrSessionPartCountForKey(key: string): void {\n this.getDelegate().incrSessionPartCountForKey(key);\n }\n\n public incrNextSessionPartCountForKey(key: string): void {\n this.getDelegate().incrNextSessionPartCountForKey(key);\n }\n\n public addSessionPartStartedListener(\n listener: (event: SessionPartStartedEvent) => void,\n ): () => void {\n return this.getDelegate().addSessionPartStartedListener(listener);\n }\n\n public addSessionPartEndedListener(listener: () => void): () => void {\n return this.getDelegate().addSessionPartEndedListener(listener);\n }\n\n public setTracerProvider(tracerProvider: TracerProvider): void {\n this.getDelegate().setTracerProvider(tracerProvider);\n }\n\n public setAnalyticsManager(manager: AnalyticsManagerInternal | null): void {\n this.getDelegate().setAnalyticsManager(manager);\n }\n\n public recordSDKStartupDuration(duration: number): void {\n this.getDelegate().recordSDKStartupDuration(duration);\n }\n\n public claimReplaySample(sampleRate: number): boolean {\n return this.getDelegate().claimReplaySample(sampleRate);\n }\n\n public nextReplayMetaVersion(): number {\n return this.getDelegate().nextReplayMetaVersion();\n }\n\n public _clearMaxDurationTimer(): void {\n this.getDelegate()._clearMaxDurationTimer();\n }\n\n public _shutdown(): void {\n this.getDelegate()._shutdown();\n }\n}\n"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ProxyUserSessionManager.js","names":[],"sources":["../../../../src/api-sessions/manager/ProxyUserSessionManager/ProxyUserSessionManager.ts"],"sourcesContent":["import type { TracerProvider } from '@opentelemetry/api';\nimport type { AnalyticsManagerInternal } from '../../../api-analytics/manager/types';\nimport type { ExtendedSpan } from '../../../api-traces/api/TraceAPI/types';\nimport type {\n EndSessionPartOptions,\n ReplayCounts,\n RolloverSessionPartOptions,\n StartSessionPartOptions,\n UserSessionAttributes,\n UserSessionManagerInternal,\n} from '../../../managers/MXLUserSessionManager/types';\nimport { NoOpUserSessionManager } from '../NoOpUserSessionManager/NoOpUserSessionManager';\nimport type { PropertyOptions, SessionPartStartedEvent } from '../types';\n\nconst NOOP_USER_SESSION_MANAGER = new NoOpUserSessionManager();\n\nexport class ProxyUserSessionManager implements UserSessionManagerInternal {\n private _delegate?: UserSessionManagerInternal;\n\n public getDelegate(): UserSessionManagerInternal {\n return this._delegate ?? NOOP_USER_SESSION_MANAGER;\n }\n\n public setDelegate(delegate: UserSessionManagerInternal): void {\n const previous = this._delegate;\n if (previous && previous !== delegate) {\n previous._shutdown();\n }\n this._delegate = delegate;\n }\n\n public addBreadcrumb(name: string): void {\n this.getDelegate().addBreadcrumb(name);\n }\n\n public addProperty(\n key: string,\n value: string,\n options?: PropertyOptions,\n ): void {\n this.getDelegate().addProperty(key, value, options);\n }\n\n public removeProperty(key: string): void {\n this.getDelegate().removeProperty(key);\n }\n\n public getUserSessionId(): string | null {\n return this.getDelegate().getUserSessionId();\n }\n\n public getPreviousUserSessionId(): string | null {\n return this.getDelegate().getPreviousUserSessionId();\n }\n\n public getUserSessionStartTime(): number | null {\n return this.getDelegate().getUserSessionStartTime();\n }\n\n public endUserSession(): void {\n this.getDelegate().endUserSession();\n }\n\n public getUserSessionAttributes(): UserSessionAttributes | null {\n return this.getDelegate().getUserSessionAttributes();\n }\n\n public getSessionPartProperties(): Record<string, string> {\n return this.getDelegate().getSessionPartProperties();\n }\n\n public getSessionPartId(): string | null {\n return this.getDelegate().getSessionPartId();\n }\n\n public getSessionPartIdAt(timestampEpochMillis: number): string | null {\n return this.getDelegate().getSessionPartIdAt(timestampEpochMillis);\n }\n\n public getSessionPartSpan(): ExtendedSpan | null {\n return this.getDelegate().getSessionPartSpan();\n }\n\n public startSessionPartInternal(options: StartSessionPartOptions): void {\n this.getDelegate().startSessionPartInternal(options);\n }\n\n public endSessionPartInternal(options: EndSessionPartOptions): void {\n this.getDelegate().endSessionPartInternal(options);\n }\n\n public rolloverSessionPartInternal(\n options: RolloverSessionPartOptions,\n ): void {\n this.getDelegate().rolloverSessionPartInternal(options);\n }\n\n public incrSessionPartCountForKey(key: string): void {\n this.getDelegate().incrSessionPartCountForKey(key);\n }\n\n public incrNextSessionPartCountForKey(key: string): void {\n this.getDelegate().incrNextSessionPartCountForKey(key);\n }\n\n public addSessionPartStartedListener(\n listener: (event: SessionPartStartedEvent) => void,\n ): () => void {\n return this.getDelegate().addSessionPartStartedListener(listener);\n }\n\n public addSessionPartEndedListener(listener: () => void): () => void {\n return this.getDelegate().addSessionPartEndedListener(listener);\n }\n\n public setTracerProvider(tracerProvider: TracerProvider): void {\n this.getDelegate().setTracerProvider(tracerProvider);\n }\n\n public setAnalyticsManager(manager: AnalyticsManagerInternal | null): void {\n this.getDelegate().setAnalyticsManager(manager);\n }\n\n public recordSDKStartupDuration(duration: number): void {\n this.getDelegate().recordSDKStartupDuration(duration);\n }\n\n public claimReplaySample(sampleRate: number): boolean {\n return this.getDelegate().claimReplaySample(sampleRate);\n }\n\n public nextReplayMetaVersion(): number {\n return this.getDelegate().nextReplayMetaVersion();\n }\n\n public incrReplayCount(key: keyof ReplayCounts): void {\n this.getDelegate().incrReplayCount(key);\n }\n\n public getReplayCounts(): ReplayCounts {\n return this.getDelegate().getReplayCounts();\n }\n\n public _clearMaxDurationTimer(): void {\n this.getDelegate()._clearMaxDurationTimer();\n }\n\n public _shutdown(): void {\n this.getDelegate()._shutdown();\n }\n}\n"],"mappings":";;AAcA,MAAM,4BAA4B,IAAI,wBAAwB;AAE9D,IAAa,0BAAb,MAA2E;CACzE;CAEA,cAAiD;AAC/C,SAAO,KAAK,aAAa;;CAG3B,YAAmB,UAA4C;EAC7D,MAAM,WAAW,KAAK;AACtB,MAAI,YAAY,aAAa,SAC3B,UAAS,WAAW;AAEtB,OAAK,YAAY;;CAGnB,cAAqB,MAAoB;AACvC,OAAK,aAAa,CAAC,cAAc,KAAK;;CAGxC,YACE,KACA,OACA,SACM;AACN,OAAK,aAAa,CAAC,YAAY,KAAK,OAAO,QAAQ;;CAGrD,eAAsB,KAAmB;AACvC,OAAK,aAAa,CAAC,eAAe,IAAI;;CAGxC,mBAAyC;AACvC,SAAO,KAAK,aAAa,CAAC,kBAAkB;;CAG9C,2BAAiD;AAC/C,SAAO,KAAK,aAAa,CAAC,0BAA0B;;CAGtD,0BAAgD;AAC9C,SAAO,KAAK,aAAa,CAAC,yBAAyB;;CAGrD,iBAA8B;AAC5B,OAAK,aAAa,CAAC,gBAAgB;;CAGrC,2BAAgE;AAC9D,SAAO,KAAK,aAAa,CAAC,0BAA0B;;CAGtD,2BAA0D;AACxD,SAAO,KAAK,aAAa,CAAC,0BAA0B;;CAGtD,mBAAyC;AACvC,SAAO,KAAK,aAAa,CAAC,kBAAkB;;CAG9C,mBAA0B,sBAA6C;AACrE,SAAO,KAAK,aAAa,CAAC,mBAAmB,qBAAqB;;CAGpE,qBAAiD;AAC/C,SAAO,KAAK,aAAa,CAAC,oBAAoB;;CAGhD,yBAAgC,SAAwC;AACtE,OAAK,aAAa,CAAC,yBAAyB,QAAQ;;CAGtD,uBAA8B,SAAsC;AAClE,OAAK,aAAa,CAAC,uBAAuB,QAAQ;;CAGpD,4BACE,SACM;AACN,OAAK,aAAa,CAAC,4BAA4B,QAAQ;;CAGzD,2BAAkC,KAAmB;AACnD,OAAK,aAAa,CAAC,2BAA2B,IAAI;;CAGpD,+BAAsC,KAAmB;AACvD,OAAK,aAAa,CAAC,+BAA+B,IAAI;;CAGxD,8BACE,UACY;AACZ,SAAO,KAAK,aAAa,CAAC,8BAA8B,SAAS;;CAGnE,4BAAmC,UAAkC;AACnE,SAAO,KAAK,aAAa,CAAC,4BAA4B,SAAS;;CAGjE,kBAAyB,gBAAsC;AAC7D,OAAK,aAAa,CAAC,kBAAkB,eAAe;;CAGtD,oBAA2B,SAAgD;AACzE,OAAK,aAAa,CAAC,oBAAoB,QAAQ;;CAGjD,yBAAgC,UAAwB;AACtD,OAAK,aAAa,CAAC,yBAAyB,SAAS;;CAGvD,kBAAyB,YAA6B;AACpD,SAAO,KAAK,aAAa,CAAC,kBAAkB,WAAW;;CAGzD,wBAAuC;AACrC,SAAO,KAAK,aAAa,CAAC,uBAAuB;;CAGnD,gBAAuB,KAA+B;AACpD,OAAK,aAAa,CAAC,gBAAgB,IAAI;;CAGzC,kBAAuC;AACrC,SAAO,KAAK,aAAa,CAAC,iBAAiB;;CAG7C,yBAAsC;AACpC,OAAK,aAAa,CAAC,wBAAwB;;CAG7C,YAAyB;AACvB,OAAK,aAAa,CAAC,WAAW"}
|
package/dist/index.cjs
CHANGED
|
@@ -10,6 +10,7 @@ const require_common_attributes = require("./common/attributes.cjs");
|
|
|
10
10
|
const require_instrumentations_navigation_NavigationInstrumentation_instance = require("./instrumentations/navigation/NavigationInstrumentation/instance.cjs");
|
|
11
11
|
const require_instrumentations_replay_rrwebLoader_loadRrwebModule_esm = require("./instrumentations/replay/rrwebLoader/loadRrwebModule.esm.cjs");
|
|
12
12
|
const require_instrumentations_replay_ReplayInstrumentation_ReplayInstrumentation = require("./instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.cjs");
|
|
13
|
+
const require_sdk_responseSpanContext = require("./sdk/responseSpanContext.cjs");
|
|
13
14
|
const require_sdk_initSDK = require("./sdk/initSDK.cjs");
|
|
14
15
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
15
16
|
Object.defineProperty(exports, "DiagLogLevel", {
|
|
@@ -22,6 +23,7 @@ exports.ReplayInstrumentation = require_instrumentations_replay_ReplayInstrument
|
|
|
22
23
|
exports.analytics = require_api_analytics_analyticsAPI.analytics;
|
|
23
24
|
exports.attributes = require_common_attributes.attributes;
|
|
24
25
|
exports.getNavigationInstrumentation = require_instrumentations_navigation_NavigationInstrumentation_instance.getNavigationInstrumentation;
|
|
26
|
+
exports.getResponseSpanContext = require_sdk_responseSpanContext.getResponseSpanContext;
|
|
25
27
|
exports.initSDK = require_sdk_initSDK.initSDK;
|
|
26
28
|
exports.loadRrwebModule = require_instrumentations_replay_rrwebLoader_loadRrwebModule_esm.loadRrwebModule;
|
|
27
29
|
exports.log = require_api_logs_logAPI.log;
|
package/dist/index.d.cts
CHANGED
|
@@ -12,5 +12,6 @@ import { getNavigationInstrumentation } from "./instrumentations/navigation/Navi
|
|
|
12
12
|
import { ReplayInstrumentation } from "./instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.cjs";
|
|
13
13
|
import { loadRrwebModule, resetRrwebModuleCacheForTests, setRrwebModuleLoaderForTests, setRrwebScriptUrl } from "./instrumentations/replay/rrwebLoader/loadRrwebModule.esm.cjs";
|
|
14
14
|
import { initSDK } from "./sdk/initSDK.cjs";
|
|
15
|
-
import {
|
|
16
|
-
|
|
15
|
+
import { getResponseSpanContext } from "./sdk/responseSpanContext.cjs";
|
|
16
|
+
import { DiagLogLevel, Span, SpanContext } from "@opentelemetry/api";
|
|
17
|
+
export { DiagLogLevel, type DynamicConfigManager, type DynamicReplayConfig, type DynamicSDKConfig, type ExceptionConfig, type ExceptionFilter, type ExtendedSpan, type LogExceptionOptions, ReplayInstrumentation, type Span, type SpanContext, analytics, attributes, getNavigationInstrumentation, getResponseSpanContext, initSDK, loadRrwebModule, log, page, resetRrwebModuleCacheForTests, session, setRrwebModuleLoaderForTests, setRrwebScriptUrl, trace, user };
|
package/dist/index.d.ts
CHANGED
|
@@ -12,5 +12,6 @@ import { getNavigationInstrumentation } from "./instrumentations/navigation/Navi
|
|
|
12
12
|
import { ReplayInstrumentation } from "./instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.js";
|
|
13
13
|
import { loadRrwebModule, resetRrwebModuleCacheForTests, setRrwebModuleLoaderForTests, setRrwebScriptUrl } from "./instrumentations/replay/rrwebLoader/loadRrwebModule.esm.js";
|
|
14
14
|
import { initSDK } from "./sdk/initSDK.js";
|
|
15
|
-
import {
|
|
16
|
-
|
|
15
|
+
import { getResponseSpanContext } from "./sdk/responseSpanContext.js";
|
|
16
|
+
import { DiagLogLevel, Span, SpanContext } from "@opentelemetry/api";
|
|
17
|
+
export { DiagLogLevel, type DynamicConfigManager, type DynamicReplayConfig, type DynamicSDKConfig, type ExceptionConfig, type ExceptionFilter, type ExtendedSpan, type LogExceptionOptions, ReplayInstrumentation, type Span, type SpanContext, analytics, attributes, getNavigationInstrumentation, getResponseSpanContext, initSDK, loadRrwebModule, log, page, resetRrwebModuleCacheForTests, session, setRrwebModuleLoaderForTests, setRrwebScriptUrl, trace, user };
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { attributes } from "./common/attributes.js";
|
|
|
8
8
|
import { getNavigationInstrumentation } from "./instrumentations/navigation/NavigationInstrumentation/instance.js";
|
|
9
9
|
import { loadRrwebModule, resetRrwebModuleCacheForTests, setRrwebModuleLoaderForTests, setRrwebScriptUrl } from "./instrumentations/replay/rrwebLoader/loadRrwebModule.esm.js";
|
|
10
10
|
import { ReplayInstrumentation } from "./instrumentations/replay/ReplayInstrumentation/ReplayInstrumentation.js";
|
|
11
|
+
import { getResponseSpanContext } from "./sdk/responseSpanContext.js";
|
|
11
12
|
import { initSDK } from "./sdk/initSDK.js";
|
|
12
13
|
import { DiagLogLevel } from "@opentelemetry/api";
|
|
13
|
-
export { DiagLogLevel, ReplayInstrumentation, analytics, attributes, getNavigationInstrumentation, initSDK, loadRrwebModule, log, page, resetRrwebModuleCacheForTests, session, setRrwebModuleLoaderForTests, setRrwebScriptUrl, trace, user };
|
|
14
|
+
export { DiagLogLevel, ReplayInstrumentation, analytics, attributes, getNavigationInstrumentation, getResponseSpanContext, initSDK, loadRrwebModule, log, page, resetRrwebModuleCacheForTests, session, setRrwebModuleLoaderForTests, setRrwebScriptUrl, trace, user };
|
|
@@ -4,12 +4,13 @@ const require_constants_attributes = require("../../../constants/attributes.cjs"
|
|
|
4
4
|
const require_instrumentations_MXLInstrumentationBase_MXLInstrumentationBase = require("../../MXLInstrumentationBase/MXLInstrumentationBase.cjs");
|
|
5
5
|
const require_utils_performanceObserver_performanceObserver = require("../../../utils/performanceObserver/performanceObserver.cjs");
|
|
6
6
|
require("./enums/AttributeNames.cjs");
|
|
7
|
+
require("./enums/PerformanceTimingNames.cjs");
|
|
8
|
+
const require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents = require("./networkEvents.cjs");
|
|
7
9
|
const require_instrumentations_document_load_DocumentLoadInstrumentation_utils = require("./utils.cjs");
|
|
8
10
|
let _opentelemetry_api = require("@opentelemetry/api");
|
|
9
11
|
let _opentelemetry_core = require("@opentelemetry/core");
|
|
10
12
|
let _opentelemetry_semantic_conventions = require("@opentelemetry/semantic-conventions");
|
|
11
13
|
let _opentelemetry_instrumentation = require("@opentelemetry/instrumentation");
|
|
12
|
-
let _opentelemetry_sdk_trace_web = require("@opentelemetry/sdk-trace-web");
|
|
13
14
|
let _opentelemetry_semantic_conventions_incubating = require("@opentelemetry/semantic-conventions/incubating");
|
|
14
15
|
//#region src/instrumentations/document-load/DocumentLoadInstrumentation/DocumentLoadInstrumentation.ts
|
|
15
16
|
const ATTR_HTTP_RESPONSE_DELIVERY_TYPE = "http.response.delivery_type";
|
|
@@ -81,21 +82,21 @@ var DocumentLoadInstrumentation = class extends require_instrumentations_MXLInst
|
|
|
81
82
|
const entries = require_instrumentations_document_load_DocumentLoadInstrumentation_utils.getPerformanceNavigationEntries();
|
|
82
83
|
const traceparent = metaElement?.content || "";
|
|
83
84
|
_opentelemetry_api.context.with(_opentelemetry_api.propagation.extract(_opentelemetry_api.ROOT_CONTEXT, { traceparent }), () => {
|
|
84
|
-
const rootSpan = this._startSpan("documentLoad",
|
|
85
|
+
const rootSpan = this._startSpan("documentLoad", "fetchStart", entries);
|
|
85
86
|
if (!rootSpan) {
|
|
86
87
|
this._diag.warn("navigation entry has no fetchStart, document load will not be collected");
|
|
87
88
|
return;
|
|
88
89
|
}
|
|
89
90
|
_opentelemetry_api.context.with(_opentelemetry_api.trace.setSpan(_opentelemetry_api.context.active(), rootSpan), () => {
|
|
90
|
-
const fetchSpan = this._startSpan("documentFetch",
|
|
91
|
+
const fetchSpan = this._startSpan("documentFetch", "fetchStart", entries);
|
|
91
92
|
if (fetchSpan) {
|
|
92
93
|
fetchSpan.setAttribute(_opentelemetry_semantic_conventions_incubating.ATTR_URL_FULL, location.href);
|
|
93
94
|
_opentelemetry_api.context.with(_opentelemetry_api.trace.setSpan(_opentelemetry_api.context.active(), fetchSpan), () => {
|
|
94
|
-
|
|
95
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvents(fetchSpan, entries, this.getConfig().ignoreNetworkEvents);
|
|
95
96
|
this._addResourceAttributesToSpan(fetchSpan, entries);
|
|
96
97
|
this._addNavigationTimingAttributesToSpan(fetchSpan, entries);
|
|
97
98
|
this._addCustomAttributesOnSpan(fetchSpan, this.getConfig().applyCustomAttributesOnSpan?.documentFetch);
|
|
98
|
-
this._endSpan(fetchSpan,
|
|
99
|
+
this._endSpan(fetchSpan, "responseEnd", entries);
|
|
99
100
|
});
|
|
100
101
|
}
|
|
101
102
|
});
|
|
@@ -104,19 +105,19 @@ var DocumentLoadInstrumentation = class extends require_instrumentations_MXLInst
|
|
|
104
105
|
rootSpan.setAttribute(_opentelemetry_semantic_conventions_incubating.ATTR_USER_AGENT_ORIGINAL, navigator.userAgent);
|
|
105
106
|
this._addResourcesSpans(rootSpan);
|
|
106
107
|
if (!this.getConfig().ignoreNetworkEvents) {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
108
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvent(rootSpan, "fetchStart", entries);
|
|
109
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvent(rootSpan, "unloadEventStart", entries);
|
|
110
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvent(rootSpan, "unloadEventEnd", entries);
|
|
111
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvent(rootSpan, "domInteractive", entries);
|
|
112
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvent(rootSpan, "domContentLoadedEventStart", entries);
|
|
113
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvent(rootSpan, "domContentLoadedEventEnd", entries);
|
|
114
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvent(rootSpan, "domComplete", entries);
|
|
115
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvent(rootSpan, "loadEventStart", entries);
|
|
116
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvent(rootSpan, "loadEventEnd", entries);
|
|
116
117
|
}
|
|
117
118
|
if (!this.getConfig().ignorePerformancePaintEvents) require_instrumentations_document_load_DocumentLoadInstrumentation_utils.addSpanPerformancePaintEvents(rootSpan, this.perf);
|
|
118
119
|
this._addCustomAttributesOnSpan(rootSpan, this.getConfig().applyCustomAttributesOnSpan?.documentLoad);
|
|
119
|
-
this._endSpan(rootSpan,
|
|
120
|
+
this._endSpan(rootSpan, "loadEventEnd", entries);
|
|
120
121
|
});
|
|
121
122
|
}
|
|
122
123
|
/**
|
|
@@ -126,7 +127,7 @@ var DocumentLoadInstrumentation = class extends require_instrumentations_MXLInst
|
|
|
126
127
|
* @param entries
|
|
127
128
|
*/
|
|
128
129
|
_endSpan(span, performanceName, entries) {
|
|
129
|
-
if (span) if (
|
|
130
|
+
if (span) if (require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.hasKey(entries, performanceName) && typeof entries[performanceName] === "number") span.end(this.perf.epochMillisFromOriginOffset(entries[performanceName]));
|
|
130
131
|
else span.end();
|
|
131
132
|
}
|
|
132
133
|
/**
|
|
@@ -135,14 +136,14 @@ var DocumentLoadInstrumentation = class extends require_instrumentations_MXLInst
|
|
|
135
136
|
* @param parentSpan
|
|
136
137
|
*/
|
|
137
138
|
_initResourceSpan(resource, parentSpan) {
|
|
138
|
-
const span = this._startSpan("resourceFetch",
|
|
139
|
+
const span = this._startSpan("resourceFetch", "fetchStart", resource, parentSpan);
|
|
139
140
|
if (!span) return;
|
|
140
141
|
span.setAttribute(_opentelemetry_semantic_conventions_incubating.ATTR_URL_FULL, resource.name);
|
|
141
|
-
|
|
142
|
+
require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.addSpanNetworkEvents(span, resource, this.getConfig().ignoreNetworkEvents);
|
|
142
143
|
this._addResourceAttributesToSpan(span, resource);
|
|
143
144
|
this._addResourceDiagnosticAttributes(span, resource);
|
|
144
145
|
this._addCustomAttributesOnResourceSpan(span, resource, this.getConfig().applyCustomAttributesOnSpan?.resourceFetch);
|
|
145
|
-
this._endSpan(span,
|
|
146
|
+
this._endSpan(span, "responseEnd", resource);
|
|
146
147
|
}
|
|
147
148
|
/**
|
|
148
149
|
* Helper function for starting a span
|
|
@@ -152,7 +153,7 @@ var DocumentLoadInstrumentation = class extends require_instrumentations_MXLInst
|
|
|
152
153
|
* @param parentSpan
|
|
153
154
|
*/
|
|
154
155
|
_startSpan(spanName, performanceName, entries, parentSpan) {
|
|
155
|
-
if (
|
|
156
|
+
if (require_instrumentations_document_load_DocumentLoadInstrumentation_networkEvents.hasKey(entries, performanceName) && typeof entries[performanceName] === "number") return this.tracer.startSpan(spanName, { startTime: this.perf.epochMillisFromOriginOffset(entries[performanceName]) }, parentSpan ? _opentelemetry_api.trace.setSpan(_opentelemetry_api.context.active(), parentSpan) : void 0);
|
|
156
157
|
}
|
|
157
158
|
/**
|
|
158
159
|
* Adds custom attributes to span if configured
|