@openobserve/browser-core 0.2.11-rc1 → 0.2.12-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +6 -5
- package/src/boot/displayAlreadyInitializedError.ts +8 -0
- package/src/boot/init.ts +29 -15
- package/src/browser/addEventListener.ts +13 -10
- package/src/browser/{types.ts → browser.types.ts} +42 -0
- package/src/browser/cookie.ts +49 -14
- package/src/browser/fetchObservable.ts +80 -21
- package/src/browser/{pageExitObservable.ts → pageMayExitObservable.ts} +11 -22
- package/src/browser/runOnReadyState.ts +14 -4
- package/src/browser/xhrObservable.ts +17 -4
- package/src/domain/allowedTrackingOrigins.ts +30 -0
- package/src/domain/bufferedData.ts +32 -0
- package/src/domain/configuration/configuration.ts +352 -83
- package/src/domain/configuration/endpointBuilder.ts +29 -32
- package/src/domain/configuration/index.ts +6 -5
- package/src/domain/configuration/transportConfiguration.ts +42 -35
- package/src/domain/connectivity/connectivity.ts +5 -1
- package/src/domain/console/consoleObservable.ts +57 -21
- package/src/domain/context/contextConstants.ts +22 -0
- package/src/domain/context/contextManager.ts +48 -11
- package/src/domain/context/contextUtils.ts +14 -0
- package/src/domain/context/defineContextMethod.ts +31 -0
- package/src/domain/context/storeContextManager.ts +7 -3
- package/src/domain/contexts/accountContext.ts +47 -0
- package/src/domain/contexts/globalContext.ts +30 -0
- package/src/domain/contexts/rumInternalContext.type.ts +15 -0
- package/src/domain/contexts/userContext.ts +64 -0
- package/src/domain/deflate/{types.ts → deflate.types.ts} +6 -4
- package/src/domain/deflate/index.ts +1 -1
- package/src/domain/error/error.ts +28 -84
- package/src/domain/error/error.types.ts +10 -2
- package/src/domain/error/trackRuntimeError.ts +29 -32
- package/src/domain/eventRateLimiter/createEventRateLimiter.ts +5 -2
- package/src/domain/extension/extensionUtils.ts +28 -0
- package/src/domain/intakeSites.ts +18 -0
- package/src/domain/report/reportObservable.ts +35 -30
- package/src/domain/resourceUtils.ts +20 -16
- package/src/domain/session/README.md +193 -0
- package/src/domain/session/oldCookiesMigration.ts +2 -2
- package/src/domain/session/sessionConstants.ts +16 -1
- package/src/domain/session/sessionManager.ts +179 -15
- package/src/domain/session/sessionState.ts +49 -17
- package/src/domain/session/sessionStateValidation.ts +9 -0
- package/src/domain/session/sessionStore.ts +118 -55
- package/src/domain/session/sessionStoreOperations.ts +47 -20
- package/src/domain/session/storeStrategies/sessionInCookie.ts +105 -26
- package/src/domain/session/storeStrategies/sessionInLocalStorage.ts +10 -8
- package/src/domain/session/storeStrategies/sessionStoreStrategy.ts +5 -2
- package/src/domain/synthetics/syntheticsWorkerValues.ts +13 -2
- package/src/domain/tags.ts +76 -0
- package/src/domain/telemetry/index.ts +12 -4
- package/src/domain/telemetry/rawTelemetryEvent.types.ts +6 -3
- package/src/domain/telemetry/telemetry.ts +235 -106
- package/src/domain/telemetry/telemetryEvent.types.ts +514 -5
- package/src/domain/trackingConsent.ts +34 -0
- package/src/index.ts +90 -59
- package/src/tools/abstractHooks.ts +72 -0
- package/src/tools/abstractLifeCycle.ts +1 -0
- package/src/tools/boundedBuffer.ts +36 -8
- package/src/tools/display.ts +4 -0
- package/src/tools/encoder.ts +3 -2
- package/src/tools/experimentalFeatures.ts +18 -7
- package/src/tools/getZoneJsOriginalValue.ts +1 -1
- package/src/tools/{getGlobalObject.ts → globalObject.ts} +20 -0
- package/src/tools/instrumentMethod.ts +58 -41
- package/src/tools/matchOption.ts +1 -2
- package/src/tools/monitor.ts +11 -7
- package/src/tools/observable.ts +78 -12
- package/src/tools/queueMicrotask.ts +13 -0
- package/src/tools/readBytesFromStream.ts +24 -64
- package/src/tools/requestIdleCallback.ts +40 -0
- package/src/tools/sendToExtension.ts +3 -1
- package/src/tools/serialisation/context.ts +4 -1
- package/src/tools/serialisation/sanitize.ts +32 -14
- package/src/{domain/error → tools/stackTrace}/computeStackTrace.ts +72 -8
- package/src/tools/stackTrace/handlingStack.ts +48 -0
- package/src/tools/taskQueue.ts +63 -0
- package/src/tools/timer.ts +1 -1
- package/src/tools/utils/arrayUtils.ts +11 -3
- package/src/tools/utils/browserDetection.ts +0 -9
- package/src/tools/utils/byteUtils.ts +13 -2
- package/src/tools/utils/functionUtils.ts +0 -2
- package/src/tools/utils/numberUtils.ts +2 -1
- package/src/tools/utils/objectUtils.ts +1 -3
- package/src/tools/utils/polyfills.ts +6 -107
- package/src/tools/utils/responseUtils.ts +1 -1
- package/src/tools/utils/stringUtils.ts +34 -2
- package/src/tools/utils/timeUtils.ts +18 -13
- package/src/tools/utils/timezone.ts +9 -0
- package/src/tools/utils/urlPolyfill.ts +29 -59
- package/src/tools/valueHistory.ts +66 -35
- package/src/transport/batch.ts +77 -80
- package/src/transport/eventBridge.ts +24 -5
- package/src/transport/flushController.ts +27 -21
- package/src/transport/httpRequest.ts +92 -71
- package/src/transport/index.ts +7 -4
- package/src/transport/sendWithRetryStrategy.ts +55 -36
- package/cjs/boot/init.d.ts +0 -5
- package/cjs/boot/init.js +0 -36
- package/cjs/boot/init.js.map +0 -1
- package/cjs/browser/addEventListener.d.ts +0 -84
- package/cjs/browser/addEventListener.js +0 -94
- package/cjs/browser/addEventListener.js.map +0 -1
- package/cjs/browser/cookie.d.ts +0 -17
- package/cjs/browser/cookie.js +0 -86
- package/cjs/browser/cookie.js.map +0 -1
- package/cjs/browser/fetchObservable.d.ts +0 -23
- package/cjs/browser/fetchObservable.js +0 -69
- package/cjs/browser/fetchObservable.js.map +0 -1
- package/cjs/browser/pageExitObservable.d.ts +0 -14
- package/cjs/browser/pageExitObservable.js +0 -57
- package/cjs/browser/pageExitObservable.js.map +0 -1
- package/cjs/browser/runOnReadyState.d.ts +0 -2
- package/cjs/browser/runOnReadyState.js +0 -15
- package/cjs/browser/runOnReadyState.js.map +0 -1
- package/cjs/browser/types.d.ts +0 -19
- package/cjs/browser/types.js +0 -6
- package/cjs/browser/types.js.map +0 -1
- package/cjs/browser/xhrObservable.d.ts +0 -21
- package/cjs/browser/xhrObservable.js +0 -85
- package/cjs/browser/xhrObservable.js.map +0 -1
- package/cjs/domain/configuration/configuration.d.ts +0 -72
- package/cjs/domain/configuration/configuration.js +0 -94
- package/cjs/domain/configuration/configuration.js.map +0 -1
- package/cjs/domain/configuration/endpointBuilder.d.ts +0 -10
- package/cjs/domain/configuration/endpointBuilder.js +0 -84
- package/cjs/domain/configuration/endpointBuilder.js.map +0 -1
- package/cjs/domain/configuration/index.d.ts +0 -4
- package/cjs/domain/configuration/index.js +0 -27
- package/cjs/domain/configuration/index.js.map +0 -1
- package/cjs/domain/configuration/intakeSites.d.ts +0 -5
- package/cjs/domain/configuration/intakeSites.js +0 -9
- package/cjs/domain/configuration/intakeSites.js.map +0 -1
- package/cjs/domain/configuration/tags.d.ts +0 -4
- package/cjs/domain/configuration/tags.js +0 -39
- package/cjs/domain/configuration/tags.js.map +0 -1
- package/cjs/domain/configuration/transportConfiguration.d.ts +0 -16
- package/cjs/domain/configuration/transportConfiguration.js +0 -42
- package/cjs/domain/configuration/transportConfiguration.js.map +0 -1
- package/cjs/domain/connectivity/connectivity.d.ts +0 -13
- package/cjs/domain/connectivity/connectivity.js +0 -14
- package/cjs/domain/connectivity/connectivity.js.map +0 -1
- package/cjs/domain/connectivity/index.d.ts +0 -1
- package/cjs/domain/connectivity/index.js +0 -18
- package/cjs/domain/connectivity/index.js.map +0 -1
- package/cjs/domain/console/consoleObservable.d.ts +0 -11
- package/cjs/domain/console/consoleObservable.js +0 -72
- package/cjs/domain/console/consoleObservable.js.map +0 -1
- package/cjs/domain/context/contextConstants.d.ts +0 -5
- package/cjs/domain/context/contextConstants.js +0 -3
- package/cjs/domain/context/contextConstants.js.map +0 -1
- package/cjs/domain/context/contextManager.d.ts +0 -12
- package/cjs/domain/context/contextManager.js +0 -43
- package/cjs/domain/context/contextManager.js.map +0 -1
- package/cjs/domain/context/customerDataTracker.d.ts +0 -45
- package/cjs/domain/context/customerDataTracker.js +0 -107
- package/cjs/domain/context/customerDataTracker.js.map +0 -1
- package/cjs/domain/context/storeContextManager.d.ts +0 -6
- package/cjs/domain/context/storeContextManager.js +0 -38
- package/cjs/domain/context/storeContextManager.js.map +0 -1
- package/cjs/domain/deflate/types.d.ts +0 -0
- package/cjs/domain/deflate/types.js +0 -3
- package/cjs/domain/deflate/types.js.map +0 -1
- package/cjs/domain/error/computeStackTrace.d.ts +0 -33
- package/cjs/domain/error/computeStackTrace.js +0 -142
- package/cjs/domain/error/computeStackTrace.js.map +0 -1
- package/cjs/domain/error/error.d.ts +0 -28
- package/cjs/domain/error/error.js +0 -131
- package/cjs/domain/error/error.js.map +0 -1
- package/cjs/domain/error/error.types.d.ts +0 -40
- package/cjs/domain/error/error.types.js +0 -13
- package/cjs/domain/error/error.types.js.map +0 -1
- package/cjs/domain/error/trackRuntimeError.d.ts +0 -13
- package/cjs/domain/error/trackRuntimeError.js +0 -54
- package/cjs/domain/error/trackRuntimeError.js.map +0 -1
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.d.ts +0 -5
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.js +0 -40
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.js.map +0 -1
- package/cjs/domain/report/browser.types.d.ts +0 -34
- package/cjs/domain/report/browser.types.js +0 -3
- package/cjs/domain/report/browser.types.js.map +0 -1
- package/cjs/domain/report/reportObservable.d.ts +0 -17
- package/cjs/domain/report/reportObservable.js +0 -94
- package/cjs/domain/report/reportObservable.js.map +0 -1
- package/cjs/domain/resourceUtils.d.ts +0 -16
- package/cjs/domain/resourceUtils.js +0 -3
- package/cjs/domain/resourceUtils.js.map +0 -1
- package/cjs/domain/session/oldCookiesMigration.d.ts +0 -11
- package/cjs/domain/session/oldCookiesMigration.js +0 -40
- package/cjs/domain/session/oldCookiesMigration.js.map +0 -1
- package/cjs/domain/session/sessionConstants.d.ts +0 -2
- package/cjs/domain/session/sessionConstants.js +0 -7
- package/cjs/domain/session/sessionConstants.js.map +0 -1
- package/cjs/domain/session/sessionManager.d.ts +0 -20
- package/cjs/domain/session/sessionManager.js +0 -65
- package/cjs/domain/session/sessionManager.js.map +0 -1
- package/cjs/domain/session/sessionState.d.ts +0 -11
- package/cjs/domain/session/sessionState.js +0 -45
- package/cjs/domain/session/sessionState.js.map +0 -1
- package/cjs/domain/session/sessionStore.d.ts +0 -34
- package/cjs/domain/session/sessionStore.js +0 -144
- package/cjs/domain/session/sessionStore.js.map +0 -1
- package/cjs/domain/session/sessionStoreOperations.d.ts +0 -10
- package/cjs/domain/session/sessionStoreOperations.js +0 -96
- package/cjs/domain/session/sessionStoreOperations.js.map +0 -1
- package/cjs/domain/session/storeStrategies/sessionInCookie.d.ts +0 -6
- package/cjs/domain/session/storeStrategies/sessionInCookie.js +0 -59
- package/cjs/domain/session/storeStrategies/sessionInCookie.js.map +0 -1
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.d.ts +0 -3
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js +0 -41
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js.map +0 -1
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.d.ts +0 -15
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.js +0 -5
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.js.map +0 -1
- package/cjs/domain/synthetics/syntheticsWorkerValues.d.ts +0 -11
- package/cjs/domain/synthetics/syntheticsWorkerValues.js +0 -22
- package/cjs/domain/synthetics/syntheticsWorkerValues.js.map +0 -1
- package/cjs/domain/telemetry/index.d.ts +0 -3
- package/cjs/domain/telemetry/index.js +0 -28
- package/cjs/domain/telemetry/index.js.map +0 -1
- package/cjs/domain/telemetry/rawTelemetryEvent.types.d.ts +0 -15
- package/cjs/domain/telemetry/rawTelemetryEvent.types.js +0 -8
- package/cjs/domain/telemetry/rawTelemetryEvent.types.js.map +0 -1
- package/cjs/domain/telemetry/telemetry.d.ts +0 -116
- package/cjs/domain/telemetry/telemetry.js +0 -157
- package/cjs/domain/telemetry/telemetry.js.map +0 -1
- package/cjs/domain/telemetry/telemetryEvent.types.d.ts +0 -391
- package/cjs/domain/telemetry/telemetryEvent.types.js +0 -7
- package/cjs/domain/telemetry/telemetryEvent.types.js.map +0 -1
- package/cjs/domain/user/index.d.ts +0 -2
- package/cjs/domain/user/index.js +0 -19
- package/cjs/domain/user/index.js.map +0 -1
- package/cjs/domain/user/user.d.ts +0 -12
- package/cjs/domain/user/user.js +0 -35
- package/cjs/domain/user/user.js.map +0 -1
- package/cjs/domain/user/user.types.d.ts +0 -6
- package/cjs/domain/user/user.types.js +0 -3
- package/cjs/domain/user/user.types.js.map +0 -1
- package/cjs/tools/abstractLifeCycle.d.ts +0 -23
- package/cjs/tools/abstractLifeCycle.js +0 -29
- package/cjs/tools/abstractLifeCycle.js.map +0 -1
- package/cjs/tools/boundedBuffer.d.ts +0 -5
- package/cjs/tools/boundedBuffer.js +0 -22
- package/cjs/tools/boundedBuffer.js.map +0 -1
- package/cjs/tools/catchUserErrors.d.ts +0 -1
- package/cjs/tools/catchUserErrors.js +0 -20
- package/cjs/tools/catchUserErrors.js.map +0 -1
- package/cjs/tools/display.d.ts +0 -35
- package/cjs/tools/display.js +0 -41
- package/cjs/tools/display.js.map +0 -1
- package/cjs/tools/encoder.d.ts +0 -53
- package/cjs/tools/encoder.js +0 -41
- package/cjs/tools/encoder.js.map +0 -1
- package/cjs/tools/experimentalFeatures.d.ts +0 -22
- package/cjs/tools/experimentalFeatures.js +0 -45
- package/cjs/tools/experimentalFeatures.js.map +0 -1
- package/cjs/tools/getGlobalObject.d.ts +0 -4
- package/cjs/tools/getGlobalObject.js +0 -37
- package/cjs/tools/getGlobalObject.js.map +0 -1
- package/cjs/tools/getZoneJsOriginalValue.d.ts +0 -19
- package/cjs/tools/getZoneJsOriginalValue.js +0 -30
- package/cjs/tools/getZoneJsOriginalValue.js.map +0 -1
- package/cjs/tools/instrumentMethod.d.ts +0 -59
- package/cjs/tools/instrumentMethod.js +0 -106
- package/cjs/tools/instrumentMethod.js.map +0 -1
- package/cjs/tools/matchOption.d.ts +0 -8
- package/cjs/tools/matchOption.js +0 -38
- package/cjs/tools/matchOption.js.map +0 -1
- package/cjs/tools/mergeInto.d.ts +0 -25
- package/cjs/tools/mergeInto.js +0 -105
- package/cjs/tools/mergeInto.js.map +0 -1
- package/cjs/tools/monitor.d.ts +0 -8
- package/cjs/tools/monitor.js +0 -76
- package/cjs/tools/monitor.js.map +0 -1
- package/cjs/tools/observable.d.ts +0 -12
- package/cjs/tools/observable.js +0 -43
- package/cjs/tools/observable.js.map +0 -1
- package/cjs/tools/readBytesFromStream.d.ts +0 -11
- package/cjs/tools/readBytesFromStream.js +0 -64
- package/cjs/tools/readBytesFromStream.js.map +0 -1
- package/cjs/tools/sendToExtension.d.ts +0 -3
- package/cjs/tools/sendToExtension.js +0 -11
- package/cjs/tools/sendToExtension.js.map +0 -1
- package/cjs/tools/serialisation/context.d.ts +0 -6
- package/cjs/tools/serialisation/context.js +0 -3
- package/cjs/tools/serialisation/context.js.map +0 -1
- package/cjs/tools/serialisation/jsonStringify.d.ts +0 -13
- package/cjs/tools/serialisation/jsonStringify.js +0 -49
- package/cjs/tools/serialisation/jsonStringify.js.map +0 -1
- package/cjs/tools/serialisation/sanitize.d.ts +0 -18
- package/cjs/tools/serialisation/sanitize.js +0 -185
- package/cjs/tools/serialisation/sanitize.js.map +0 -1
- package/cjs/tools/timer.d.ts +0 -5
- package/cjs/tools/timer.js +0 -23
- package/cjs/tools/timer.js.map +0 -1
- package/cjs/tools/utils/arrayUtils.d.ts +0 -1
- package/cjs/tools/utils/arrayUtils.js +0 -11
- package/cjs/tools/utils/arrayUtils.js.map +0 -1
- package/cjs/tools/utils/browserDetection.d.ts +0 -10
- package/cjs/tools/utils/browserDetection.js +0 -42
- package/cjs/tools/utils/browserDetection.js.map +0 -1
- package/cjs/tools/utils/byteUtils.d.ts +0 -4
- package/cjs/tools/utils/byteUtils.js +0 -31
- package/cjs/tools/utils/byteUtils.js.map +0 -1
- package/cjs/tools/utils/functionUtils.d.ts +0 -9
- package/cjs/tools/utils/functionUtils.js +0 -48
- package/cjs/tools/utils/functionUtils.js.map +0 -1
- package/cjs/tools/utils/numberUtils.d.ts +0 -8
- package/cjs/tools/utils/numberUtils.js +0 -24
- package/cjs/tools/utils/numberUtils.js.map +0 -1
- package/cjs/tools/utils/objectUtils.d.ts +0 -10
- package/cjs/tools/utils/objectUtils.js +0 -26
- package/cjs/tools/utils/objectUtils.js.map +0 -1
- package/cjs/tools/utils/polyfills.d.ts +0 -24
- package/cjs/tools/utils/polyfills.js +0 -110
- package/cjs/tools/utils/polyfills.js.map +0 -1
- package/cjs/tools/utils/responseUtils.d.ts +0 -2
- package/cjs/tools/utils/responseUtils.js +0 -18
- package/cjs/tools/utils/responseUtils.js.map +0 -1
- package/cjs/tools/utils/stringUtils.d.ts +0 -8
- package/cjs/tools/utils/stringUtils.js +0 -59
- package/cjs/tools/utils/stringUtils.js.map +0 -1
- package/cjs/tools/utils/timeUtils.d.ts +0 -57
- package/cjs/tools/utils/timeUtils.js +0 -99
- package/cjs/tools/utils/timeUtils.js.map +0 -1
- package/cjs/tools/utils/typeUtils.d.ts +0 -4
- package/cjs/tools/utils/typeUtils.js +0 -17
- package/cjs/tools/utils/typeUtils.js.map +0 -1
- package/cjs/tools/utils/urlPolyfill.d.ts +0 -14
- package/cjs/tools/utils/urlPolyfill.js +0 -92
- package/cjs/tools/utils/urlPolyfill.js.map +0 -1
- package/cjs/tools/valueHistory.d.ts +0 -50
- package/cjs/tools/valueHistory.js +0 -106
- package/cjs/tools/valueHistory.js.map +0 -1
- package/cjs/transport/batch.d.ts +0 -21
- package/cjs/transport/batch.js +0 -123
- package/cjs/transport/batch.js.map +0 -1
- package/cjs/transport/eventBridge.d.ts +0 -12
- package/cjs/transport/eventBridge.js +0 -34
- package/cjs/transport/eventBridge.js.map +0 -1
- package/cjs/transport/flushController.d.ts +0 -58
- package/cjs/transport/flushController.js +0 -112
- package/cjs/transport/flushController.js.map +0 -1
- package/cjs/transport/httpRequest.d.ts +0 -38
- package/cjs/transport/httpRequest.js +0 -95
- package/cjs/transport/httpRequest.js.map +0 -1
- package/cjs/transport/index.d.ts +0 -4
- package/cjs/transport/index.js +0 -13
- package/cjs/transport/index.js.map +0 -1
- package/cjs/transport/sendWithRetryStrategy.d.ts +0 -39
- package/cjs/transport/sendWithRetryStrategy.js +0 -151
- package/cjs/transport/sendWithRetryStrategy.js.map +0 -1
- package/cjs/transport/startBatchWithReplica.d.ts +0 -20
- package/cjs/transport/startBatchWithReplica.js +0 -42
- package/cjs/transport/startBatchWithReplica.js.map +0 -1
- package/esm/boot/init.d.ts +0 -5
- package/esm/boot/init.js +0 -31
- package/esm/boot/init.js.map +0 -1
- package/esm/browser/addEventListener.d.ts +0 -84
- package/esm/browser/addEventListener.js +0 -89
- package/esm/browser/addEventListener.js.map +0 -1
- package/esm/browser/cookie.d.ts +0 -17
- package/esm/browser/cookie.js +0 -76
- package/esm/browser/cookie.js.map +0 -1
- package/esm/browser/fetchObservable.d.ts +0 -23
- package/esm/browser/fetchObservable.js +0 -65
- package/esm/browser/fetchObservable.js.map +0 -1
- package/esm/browser/pageExitObservable.d.ts +0 -14
- package/esm/browser/pageExitObservable.js +0 -52
- package/esm/browser/pageExitObservable.js.map +0 -1
- package/esm/browser/runOnReadyState.d.ts +0 -2
- package/esm/browser/runOnReadyState.js +0 -11
- package/esm/browser/runOnReadyState.js.map +0 -1
- package/esm/browser/types.d.ts +0 -19
- package/esm/browser/types.js +0 -5
- package/esm/browser/types.js.map +0 -1
- package/esm/browser/xhrObservable.d.ts +0 -21
- package/esm/browser/xhrObservable.js +0 -81
- package/esm/browser/xhrObservable.js.map +0 -1
- package/esm/domain/configuration/configuration.d.ts +0 -72
- package/esm/domain/configuration/configuration.js +0 -89
- package/esm/domain/configuration/configuration.js.map +0 -1
- package/esm/domain/configuration/endpointBuilder.d.ts +0 -10
- package/esm/domain/configuration/endpointBuilder.js +0 -80
- package/esm/domain/configuration/endpointBuilder.js.map +0 -1
- package/esm/domain/configuration/index.d.ts +0 -4
- package/esm/domain/configuration/index.js +0 -5
- package/esm/domain/configuration/index.js.map +0 -1
- package/esm/domain/configuration/intakeSites.d.ts +0 -5
- package/esm/domain/configuration/intakeSites.js +0 -6
- package/esm/domain/configuration/intakeSites.js.map +0 -1
- package/esm/domain/configuration/tags.d.ts +0 -4
- package/esm/domain/configuration/tags.js +0 -34
- package/esm/domain/configuration/tags.js.map +0 -1
- package/esm/domain/configuration/transportConfiguration.d.ts +0 -16
- package/esm/domain/configuration/transportConfiguration.js +0 -38
- package/esm/domain/configuration/transportConfiguration.js.map +0 -1
- package/esm/domain/connectivity/connectivity.d.ts +0 -13
- package/esm/domain/connectivity/connectivity.js +0 -10
- package/esm/domain/connectivity/connectivity.js.map +0 -1
- package/esm/domain/connectivity/index.d.ts +0 -1
- package/esm/domain/connectivity/index.js +0 -2
- package/esm/domain/connectivity/index.js.map +0 -1
- package/esm/domain/console/consoleObservable.d.ts +0 -11
- package/esm/domain/console/consoleObservable.js +0 -67
- package/esm/domain/console/consoleObservable.js.map +0 -1
- package/esm/domain/context/contextConstants.d.ts +0 -5
- package/esm/domain/context/contextConstants.js +0 -2
- package/esm/domain/context/contextConstants.js.map +0 -1
- package/esm/domain/context/contextManager.d.ts +0 -12
- package/esm/domain/context/contextManager.js +0 -39
- package/esm/domain/context/contextManager.js.map +0 -1
- package/esm/domain/context/customerDataTracker.d.ts +0 -45
- package/esm/domain/context/customerDataTracker.js +0 -102
- package/esm/domain/context/customerDataTracker.js.map +0 -1
- package/esm/domain/context/storeContextManager.d.ts +0 -6
- package/esm/domain/context/storeContextManager.js +0 -32
- package/esm/domain/context/storeContextManager.js.map +0 -1
- package/esm/domain/deflate/index.d.ts +0 -1
- package/esm/domain/deflate/index.js +0 -2
- package/esm/domain/deflate/index.js.map +0 -1
- package/esm/domain/deflate/types.d.ts +0 -38
- package/esm/domain/deflate/types.js +0 -2
- package/esm/domain/deflate/types.js.map +0 -1
- package/esm/domain/error/computeStackTrace.d.ts +0 -33
- package/esm/domain/error/computeStackTrace.js +0 -137
- package/esm/domain/error/computeStackTrace.js.map +0 -1
- package/esm/domain/error/error.d.ts +0 -28
- package/esm/domain/error/error.js +0 -121
- package/esm/domain/error/error.js.map +0 -1
- package/esm/domain/error/error.types.d.ts +0 -40
- package/esm/domain/error/error.types.js +0 -10
- package/esm/domain/error/error.types.js.map +0 -1
- package/esm/domain/error/trackRuntimeError.d.ts +0 -13
- package/esm/domain/error/trackRuntimeError.js +0 -48
- package/esm/domain/error/trackRuntimeError.js.map +0 -1
- package/esm/domain/eventRateLimiter/createEventRateLimiter.d.ts +0 -5
- package/esm/domain/eventRateLimiter/createEventRateLimiter.js +0 -36
- package/esm/domain/eventRateLimiter/createEventRateLimiter.js.map +0 -1
- package/esm/domain/report/browser.types.d.ts +0 -34
- package/esm/domain/report/browser.types.js +0 -2
- package/esm/domain/report/browser.types.js.map +0 -1
- package/esm/domain/report/reportObservable.d.ts +0 -17
- package/esm/domain/report/reportObservable.js +0 -90
- package/esm/domain/report/reportObservable.js.map +0 -1
- package/esm/domain/resourceUtils.d.ts +0 -16
- package/esm/domain/resourceUtils.js +0 -2
- package/esm/domain/resourceUtils.js.map +0 -1
- package/esm/domain/session/oldCookiesMigration.d.ts +0 -11
- package/esm/domain/session/oldCookiesMigration.js +0 -36
- package/esm/domain/session/oldCookiesMigration.js.map +0 -1
- package/esm/domain/session/sessionConstants.d.ts +0 -2
- package/esm/domain/session/sessionConstants.js +0 -4
- package/esm/domain/session/sessionConstants.js.map +0 -1
- package/esm/domain/session/sessionManager.d.ts +0 -20
- package/esm/domain/session/sessionManager.js +0 -60
- package/esm/domain/session/sessionManager.js.map +0 -1
- package/esm/domain/session/sessionState.d.ts +0 -11
- package/esm/domain/session/sessionState.js +0 -38
- package/esm/domain/session/sessionState.js.map +0 -1
- package/esm/domain/session/sessionStore.d.ts +0 -34
- package/esm/domain/session/sessionStore.js +0 -139
- package/esm/domain/session/sessionStore.js.map +0 -1
- package/esm/domain/session/sessionStoreOperations.d.ts +0 -10
- package/esm/domain/session/sessionStoreOperations.js +0 -92
- package/esm/domain/session/sessionStoreOperations.js.map +0 -1
- package/esm/domain/session/storeStrategies/sessionInCookie.d.ts +0 -6
- package/esm/domain/session/storeStrategies/sessionInCookie.js +0 -53
- package/esm/domain/session/storeStrategies/sessionInCookie.js.map +0 -1
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.d.ts +0 -3
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js +0 -36
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js.map +0 -1
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.d.ts +0 -15
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.js +0 -2
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.js.map +0 -1
- package/esm/domain/synthetics/syntheticsWorkerValues.d.ts +0 -11
- package/esm/domain/synthetics/syntheticsWorkerValues.js +0 -16
- package/esm/domain/synthetics/syntheticsWorkerValues.js.map +0 -1
- package/esm/domain/telemetry/index.d.ts +0 -3
- package/esm/domain/telemetry/index.js +0 -4
- package/esm/domain/telemetry/index.js.map +0 -1
- package/esm/domain/telemetry/rawTelemetryEvent.types.d.ts +0 -15
- package/esm/domain/telemetry/rawTelemetryEvent.types.js +0 -5
- package/esm/domain/telemetry/rawTelemetryEvent.types.js.map +0 -1
- package/esm/domain/telemetry/telemetry.d.ts +0 -116
- package/esm/domain/telemetry/telemetry.js +0 -145
- package/esm/domain/telemetry/telemetry.js.map +0 -1
- package/esm/domain/telemetry/telemetryEvent.types.d.ts +0 -391
- package/esm/domain/telemetry/telemetryEvent.types.js +0 -6
- package/esm/domain/telemetry/telemetryEvent.types.js.map +0 -1
- package/esm/domain/user/index.d.ts +0 -2
- package/esm/domain/user/index.js +0 -3
- package/esm/domain/user/index.js.map +0 -1
- package/esm/domain/user/user.d.ts +0 -12
- package/esm/domain/user/user.js +0 -30
- package/esm/domain/user/user.js.map +0 -1
- package/esm/domain/user/user.types.d.ts +0 -6
- package/esm/domain/user/user.types.js +0 -2
- package/esm/domain/user/user.types.js.map +0 -1
- package/esm/index.d.ts +0 -67
- package/esm/index.js +0 -64
- package/esm/index.js.map +0 -1
- package/esm/tools/abstractLifeCycle.d.ts +0 -23
- package/esm/tools/abstractLifeCycle.js +0 -26
- package/esm/tools/abstractLifeCycle.js.map +0 -1
- package/esm/tools/boundedBuffer.d.ts +0 -5
- package/esm/tools/boundedBuffer.js +0 -19
- package/esm/tools/boundedBuffer.js.map +0 -1
- package/esm/tools/catchUserErrors.d.ts +0 -1
- package/esm/tools/catchUserErrors.js +0 -16
- package/esm/tools/catchUserErrors.js.map +0 -1
- package/esm/tools/display.d.ts +0 -35
- package/esm/tools/display.js +0 -38
- package/esm/tools/display.js.map +0 -1
- package/esm/tools/encoder.d.ts +0 -53
- package/esm/tools/encoder.js +0 -37
- package/esm/tools/encoder.js.map +0 -1
- package/esm/tools/experimentalFeatures.d.ts +0 -22
- package/esm/tools/experimentalFeatures.js +0 -38
- package/esm/tools/experimentalFeatures.js.map +0 -1
- package/esm/tools/getGlobalObject.d.ts +0 -4
- package/esm/tools/getGlobalObject.js +0 -33
- package/esm/tools/getGlobalObject.js.map +0 -1
- package/esm/tools/getZoneJsOriginalValue.d.ts +0 -19
- package/esm/tools/getZoneJsOriginalValue.js +0 -26
- package/esm/tools/getZoneJsOriginalValue.js.map +0 -1
- package/esm/tools/instrumentMethod.d.ts +0 -59
- package/esm/tools/instrumentMethod.js +0 -101
- package/esm/tools/instrumentMethod.js.map +0 -1
- package/esm/tools/matchOption.d.ts +0 -8
- package/esm/tools/matchOption.js +0 -33
- package/esm/tools/matchOption.js.map +0 -1
- package/esm/tools/mergeInto.d.ts +0 -25
- package/esm/tools/mergeInto.js +0 -99
- package/esm/tools/mergeInto.js.map +0 -1
- package/esm/tools/monitor.d.ts +0 -8
- package/esm/tools/monitor.js +0 -66
- package/esm/tools/monitor.js.map +0 -1
- package/esm/tools/observable.d.ts +0 -12
- package/esm/tools/observable.js +0 -39
- package/esm/tools/observable.js.map +0 -1
- package/esm/tools/readBytesFromStream.d.ts +0 -11
- package/esm/tools/readBytesFromStream.js +0 -60
- package/esm/tools/readBytesFromStream.js.map +0 -1
- package/esm/tools/sendToExtension.d.ts +0 -3
- package/esm/tools/sendToExtension.js +0 -7
- package/esm/tools/sendToExtension.js.map +0 -1
- package/esm/tools/serialisation/context.d.ts +0 -6
- package/esm/tools/serialisation/context.js +0 -2
- package/esm/tools/serialisation/context.js.map +0 -1
- package/esm/tools/serialisation/jsonStringify.d.ts +0 -13
- package/esm/tools/serialisation/jsonStringify.js +0 -44
- package/esm/tools/serialisation/jsonStringify.js.map +0 -1
- package/esm/tools/serialisation/sanitize.d.ts +0 -18
- package/esm/tools/serialisation/sanitize.js +0 -181
- package/esm/tools/serialisation/sanitize.js.map +0 -1
- package/esm/tools/timer.d.ts +0 -5
- package/esm/tools/timer.js +0 -16
- package/esm/tools/timer.js.map +0 -1
- package/esm/tools/utils/arrayUtils.d.ts +0 -1
- package/esm/tools/utils/arrayUtils.js +0 -7
- package/esm/tools/utils/arrayUtils.js.map +0 -1
- package/esm/tools/utils/browserDetection.d.ts +0 -10
- package/esm/tools/utils/browserDetection.js +0 -35
- package/esm/tools/utils/browserDetection.js.map +0 -1
- package/esm/tools/utils/byteUtils.d.ts +0 -4
- package/esm/tools/utils/byteUtils.js +0 -26
- package/esm/tools/utils/byteUtils.js.map +0 -1
- package/esm/tools/utils/functionUtils.d.ts +0 -9
- package/esm/tools/utils/functionUtils.js +0 -43
- package/esm/tools/utils/functionUtils.js.map +0 -1
- package/esm/tools/utils/numberUtils.d.ts +0 -8
- package/esm/tools/utils/numberUtils.js +0 -17
- package/esm/tools/utils/numberUtils.js.map +0 -1
- package/esm/tools/utils/objectUtils.d.ts +0 -10
- package/esm/tools/utils/objectUtils.js +0 -19
- package/esm/tools/utils/objectUtils.js.map +0 -1
- package/esm/tools/utils/polyfills.d.ts +0 -24
- package/esm/tools/utils/polyfills.js +0 -95
- package/esm/tools/utils/polyfills.js.map +0 -1
- package/esm/tools/utils/responseUtils.d.ts +0 -2
- package/esm/tools/utils/responseUtils.js +0 -13
- package/esm/tools/utils/responseUtils.js.map +0 -1
- package/esm/tools/utils/stringUtils.d.ts +0 -8
- package/esm/tools/utils/stringUtils.js +0 -52
- package/esm/tools/utils/stringUtils.js.map +0 -1
- package/esm/tools/utils/timeUtils.d.ts +0 -57
- package/esm/tools/utils/timeUtils.js +0 -82
- package/esm/tools/utils/timeUtils.js.map +0 -1
- package/esm/tools/utils/typeUtils.d.ts +0 -4
- package/esm/tools/utils/typeUtils.js +0 -13
- package/esm/tools/utils/typeUtils.js.map +0 -1
- package/esm/tools/utils/urlPolyfill.d.ts +0 -14
- package/esm/tools/utils/urlPolyfill.js +0 -80
- package/esm/tools/utils/urlPolyfill.js.map +0 -1
- package/esm/tools/valueHistory.d.ts +0 -50
- package/esm/tools/valueHistory.js +0 -103
- package/esm/tools/valueHistory.js.map +0 -1
- package/esm/transport/batch.d.ts +0 -21
- package/esm/transport/batch.js +0 -120
- package/esm/transport/batch.js.map +0 -1
- package/esm/transport/eventBridge.d.ts +0 -12
- package/esm/transport/eventBridge.js +0 -29
- package/esm/transport/eventBridge.js.map +0 -1
- package/esm/transport/flushController.d.ts +0 -58
- package/esm/transport/flushController.js +0 -108
- package/esm/transport/flushController.js.map +0 -1
- package/esm/transport/httpRequest.d.ts +0 -38
- package/esm/transport/httpRequest.js +0 -89
- package/esm/transport/httpRequest.js.map +0 -1
- package/esm/transport/index.d.ts +0 -4
- package/esm/transport/index.js +0 -5
- package/esm/transport/index.js.map +0 -1
- package/esm/transport/sendWithRetryStrategy.d.ts +0 -39
- package/esm/transport/sendWithRetryStrategy.js +0 -146
- package/esm/transport/sendWithRetryStrategy.js.map +0 -1
- package/esm/transport/startBatchWithReplica.d.ts +0 -20
- package/esm/transport/startBatchWithReplica.js +0 -38
- package/esm/transport/startBatchWithReplica.js.map +0 -1
- package/src/domain/configuration/intakeSites.ts +0 -5
- package/src/domain/configuration/tags.ts +0 -43
- package/src/domain/context/customerDataTracker.ts +0 -134
- package/src/domain/user/index.ts +0 -2
- package/src/domain/user/user.ts +0 -33
- package/src/domain/user/user.types.ts +0 -6
- package/src/transport/startBatchWithReplica.ts +0 -68
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { objectValues, assign } from '../../tools/utils/polyfills';
|
|
2
|
-
import { createEndpointBuilder } from './endpointBuilder';
|
|
3
|
-
import { buildTags } from './tags';
|
|
4
|
-
import { INTAKE_SITE_US1 } from './intakeSites';
|
|
5
|
-
export function computeTransportConfiguration(initConfiguration) {
|
|
6
|
-
var tags = buildTags(initConfiguration);
|
|
7
|
-
var endpointBuilders = computeEndpointBuilders(initConfiguration, tags);
|
|
8
|
-
var intakeUrlPrefixes = objectValues(endpointBuilders).map(function (builder) { return builder.urlPrefix; });
|
|
9
|
-
var replicaConfiguration = computeReplicaConfiguration(initConfiguration, intakeUrlPrefixes, tags);
|
|
10
|
-
return assign({
|
|
11
|
-
isIntakeUrl: function (url) { return intakeUrlPrefixes.some(function (intakeEndpoint) { return url.indexOf(intakeEndpoint) === 0; }); },
|
|
12
|
-
replica: replicaConfiguration,
|
|
13
|
-
site: initConfiguration.site || INTAKE_SITE_US1,
|
|
14
|
-
}, endpointBuilders);
|
|
15
|
-
}
|
|
16
|
-
function computeEndpointBuilders(initConfiguration, tags) {
|
|
17
|
-
return {
|
|
18
|
-
logsEndpointBuilder: createEndpointBuilder(initConfiguration, 'logs', tags),
|
|
19
|
-
rumEndpointBuilder: createEndpointBuilder(initConfiguration, 'rum', tags),
|
|
20
|
-
sessionReplayEndpointBuilder: createEndpointBuilder(initConfiguration, 'replay', tags),
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function computeReplicaConfiguration(initConfiguration, intakeUrlPrefixes, tags) {
|
|
24
|
-
if (!initConfiguration.replica) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
var replicaConfiguration = assign({}, initConfiguration, {
|
|
28
|
-
site: INTAKE_SITE_US1,
|
|
29
|
-
clientToken: initConfiguration.replica.clientToken,
|
|
30
|
-
});
|
|
31
|
-
var replicaEndpointBuilders = {
|
|
32
|
-
logsEndpointBuilder: createEndpointBuilder(replicaConfiguration, 'logs', tags),
|
|
33
|
-
rumEndpointBuilder: createEndpointBuilder(replicaConfiguration, 'rum', tags),
|
|
34
|
-
};
|
|
35
|
-
intakeUrlPrefixes.push.apply(intakeUrlPrefixes, objectValues(replicaEndpointBuilders).map(function (builder) { return builder.urlPrefix; }));
|
|
36
|
-
return assign({ applicationId: initConfiguration.replica.applicationId }, replicaEndpointBuilders);
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=transportConfiguration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"transportConfiguration.js","sourceRoot":"","sources":["../../../src/domain/configuration/transportConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAGlE,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAiB/C,MAAM,UAAU,6BAA6B,CAAC,iBAAoC;IAChF,IAAM,IAAI,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAA;IAEzC,IAAM,gBAAgB,GAAG,uBAAuB,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAA;IACzE,IAAM,iBAAiB,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,SAAS,EAAjB,CAAiB,CAAC,CAAA;IAE5F,IAAM,oBAAoB,GAAG,2BAA2B,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAA;IAEpG,OAAO,MAAM,CACX;QACE,WA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C;IAEpG,OAAO,MAAM,CAAC,EAAE,aAAa,EAAE,iBAAiB,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,uBAAuB,CAAC,CAAA;AACpG,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export type NetworkInterface = 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | 'unknown';
|
|
2
|
-
export type EffectiveType = 'slow-2g' | '2g' | '3g' | '4g';
|
|
3
|
-
export interface NetworkInformation {
|
|
4
|
-
type?: NetworkInterface;
|
|
5
|
-
effectiveType?: EffectiveType;
|
|
6
|
-
}
|
|
7
|
-
export interface Connectivity {
|
|
8
|
-
status: 'connected' | 'not_connected';
|
|
9
|
-
interfaces?: NetworkInterface[];
|
|
10
|
-
effective_type?: EffectiveType;
|
|
11
|
-
[key: string]: unknown;
|
|
12
|
-
}
|
|
13
|
-
export declare function getConnectivity(): Connectivity;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export function getConnectivity() {
|
|
2
|
-
var _a;
|
|
3
|
-
var navigator = window.navigator;
|
|
4
|
-
return {
|
|
5
|
-
status: navigator.onLine ? 'connected' : 'not_connected',
|
|
6
|
-
interfaces: navigator.connection && navigator.connection.type ? [navigator.connection.type] : undefined,
|
|
7
|
-
effective_type: (_a = navigator.connection) === null || _a === void 0 ? void 0 : _a.effectiveType,
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=connectivity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"connectivity.js","sourceRoot":"","sources":["../../../src/domain/connectivity/connectivity.ts"],"names":[],"mappings":"AAmBA,MAAM,UAAU,eAAe;;IAC7B,IAAM,SAAS,GAAG,MAAM,CAAC,SAA6B,CAAA;IACtD,OAAO;QACL,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,eAAe;QACxD,UAAU,EAAE,SAAS,CAAC,UAAU,IAAI,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QACvG,cAAc,EAAE,MAAA,SAAS,CAAC,UAAU,0CAAE,aAAa;KACpD,CAAA;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './connectivity';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/connectivity/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Observable } from '../../tools/observable';
|
|
2
|
-
import { ConsoleApiName } from '../../tools/display';
|
|
3
|
-
export interface ConsoleLog {
|
|
4
|
-
message: string;
|
|
5
|
-
api: ConsoleApiName;
|
|
6
|
-
stack?: string;
|
|
7
|
-
handlingStack?: string;
|
|
8
|
-
fingerprint?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function initConsoleObservable(apis: ConsoleApiName[]): Observable<ConsoleLog>;
|
|
11
|
-
export declare function resetConsoleObservable(): void;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { createHandlingStack, formatErrorMessage, toStackTraceString, tryToGetFingerprint } from '../error/error';
|
|
2
|
-
import { mergeObservables, Observable } from '../../tools/observable';
|
|
3
|
-
import { ConsoleApiName, globalConsole } from '../../tools/display';
|
|
4
|
-
import { callMonitored } from '../../tools/monitor';
|
|
5
|
-
import { sanitize } from '../../tools/serialisation/sanitize';
|
|
6
|
-
import { find } from '../../tools/utils/polyfills';
|
|
7
|
-
import { jsonStringify } from '../../tools/serialisation/jsonStringify';
|
|
8
|
-
import { computeStackTrace } from '../error/computeStackTrace';
|
|
9
|
-
var consoleObservablesByApi = {};
|
|
10
|
-
export function initConsoleObservable(apis) {
|
|
11
|
-
var consoleObservables = apis.map(function (api) {
|
|
12
|
-
if (!consoleObservablesByApi[api]) {
|
|
13
|
-
consoleObservablesByApi[api] = createConsoleObservable(api);
|
|
14
|
-
}
|
|
15
|
-
return consoleObservablesByApi[api];
|
|
16
|
-
});
|
|
17
|
-
return mergeObservables.apply(void 0, consoleObservables);
|
|
18
|
-
}
|
|
19
|
-
export function resetConsoleObservable() {
|
|
20
|
-
consoleObservablesByApi = {};
|
|
21
|
-
}
|
|
22
|
-
function createConsoleObservable(api) {
|
|
23
|
-
return new Observable(function (observable) {
|
|
24
|
-
var originalConsoleApi = globalConsole[api];
|
|
25
|
-
globalConsole[api] = function () {
|
|
26
|
-
var params = [];
|
|
27
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
28
|
-
params[_i] = arguments[_i];
|
|
29
|
-
}
|
|
30
|
-
originalConsoleApi.apply(console, params);
|
|
31
|
-
var handlingStack = createHandlingStack();
|
|
32
|
-
callMonitored(function () {
|
|
33
|
-
observable.notify(buildConsoleLog(params, api, handlingStack));
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
return function () {
|
|
37
|
-
globalConsole[api] = originalConsoleApi;
|
|
38
|
-
};
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
function buildConsoleLog(params, api, handlingStack) {
|
|
42
|
-
var message = params.map(function (param) { return formatConsoleParameters(param); }).join(' ');
|
|
43
|
-
var stack;
|
|
44
|
-
var fingerprint;
|
|
45
|
-
if (api === ConsoleApiName.error) {
|
|
46
|
-
var firstErrorParam = find(params, function (param) { return param instanceof Error; });
|
|
47
|
-
stack = firstErrorParam ? toStackTraceString(computeStackTrace(firstErrorParam)) : undefined;
|
|
48
|
-
fingerprint = tryToGetFingerprint(firstErrorParam);
|
|
49
|
-
}
|
|
50
|
-
return {
|
|
51
|
-
api: api,
|
|
52
|
-
message: message,
|
|
53
|
-
stack: stack,
|
|
54
|
-
handlingStack: handlingStack,
|
|
55
|
-
fingerprint: fingerprint,
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
function formatConsoleParameters(param) {
|
|
59
|
-
if (typeof param === 'string') {
|
|
60
|
-
return sanitize(param);
|
|
61
|
-
}
|
|
62
|
-
if (param instanceof Error) {
|
|
63
|
-
return formatErrorMessage(computeStackTrace(param));
|
|
64
|
-
}
|
|
65
|
-
return jsonStringify(sanitize(param), undefined, 2);
|
|
66
|
-
}
|
|
67
|
-
//# sourceMappingURL=consoleObservable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consoleObservable.js","sourceRoot":"","sources":["../../../src/domain/console/consoleObservable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AACjH,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAA;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAU9D,IAAI,uBAAuB,GAAuD,EAAE,CAAA;AAEpF,MAAM,UAAU,qBAAqB,CAAC,IAAsB;IAC1D,IAAM,kBAAkB,GAAG,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG;QACtC,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC;YAClC,uBAAuB,CAAC,GAAG,CAAC,GAAG,uBAAuB,CAAC,GAAG,CAAC,CAAA;QAC7D,CAAC;QACD,OAAO,uBAAuB,CAAC,GAAG,CAAE,CAAA;IACtC,CAAC,CAAC,CAAA;IAEF,OAAO,gBAAgB,eAAgB,kBAAkB,E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CAAC,CAAC,SAAS,CAAA;QAC5F,WAAW,GAAG,mBAAmB,CAAC,eAAe,CAAC,CAAA;IACpD,CAAC;IAED,OAAO;QACL,GAAG,KAAA;QACH,OAAO,SAAA;QACP,KAAK,OAAA;QACL,aAAa,eAAA;QACb,WAAW,aAAA;KACZ,CAAA;AACH,CAAC;AAED,SAAS,uBAAuB,CAAC,KAAc;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAA;IACxB,CAAC;IACD,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,OAAO,kBAAkB,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAA;IACrD,CAAC;IACD,OAAO,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAA;AACrD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextConstants.js","sourceRoot":"","sources":["../../../src/domain/context/contextConstants.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Context } from '../../tools/serialisation/context';
|
|
2
|
-
import { Observable } from '../../tools/observable';
|
|
3
|
-
import type { CustomerDataTracker } from './customerDataTracker';
|
|
4
|
-
export type ContextManager = ReturnType<typeof createContextManager>;
|
|
5
|
-
export declare function createContextManager(customerDataTracker: CustomerDataTracker): {
|
|
6
|
-
getContext: () => Context;
|
|
7
|
-
setContext: (newContext: Context) => void;
|
|
8
|
-
setContextProperty: (key: string, property: any) => void;
|
|
9
|
-
removeContextProperty: (key: string) => void;
|
|
10
|
-
clearContext: () => void;
|
|
11
|
-
changeObservable: Observable<void>;
|
|
12
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { deepClone } from '../../tools/mergeInto';
|
|
2
|
-
import { getType } from '../../tools/utils/typeUtils';
|
|
3
|
-
import { sanitize } from '../../tools/serialisation/sanitize';
|
|
4
|
-
import { Observable } from '../../tools/observable';
|
|
5
|
-
export function createContextManager(customerDataTracker) {
|
|
6
|
-
var context = {};
|
|
7
|
-
var changeObservable = new Observable();
|
|
8
|
-
var contextManager = {
|
|
9
|
-
getContext: function () { return deepClone(context); },
|
|
10
|
-
setContext: function (newContext) {
|
|
11
|
-
if (getType(newContext) === 'object') {
|
|
12
|
-
context = sanitize(newContext);
|
|
13
|
-
customerDataTracker.updateCustomerData(context);
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
contextManager.clearContext();
|
|
17
|
-
}
|
|
18
|
-
changeObservable.notify();
|
|
19
|
-
},
|
|
20
|
-
setContextProperty: function (key, property) {
|
|
21
|
-
context[key] = sanitize(property);
|
|
22
|
-
customerDataTracker.updateCustomerData(context);
|
|
23
|
-
changeObservable.notify();
|
|
24
|
-
},
|
|
25
|
-
removeContextProperty: function (key) {
|
|
26
|
-
delete context[key];
|
|
27
|
-
customerDataTracker.updateCustomerData(context);
|
|
28
|
-
changeObservable.notify();
|
|
29
|
-
},
|
|
30
|
-
clearContext: function () {
|
|
31
|
-
context = {};
|
|
32
|
-
customerDataTracker.resetCustomerData();
|
|
33
|
-
changeObservable.notify();
|
|
34
|
-
},
|
|
35
|
-
changeObservable: changeObservable,
|
|
36
|
-
};
|
|
37
|
-
return contextManager;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=contextManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextManager.js","sourceRoot":"","sources":["../../../src/domain/context/contextManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAA;AAE7D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAKnD,MAAM,UAAU,oBAAoB,CAAC,mBAAwC;IAC3E,IAAI,OAAO,GAAY,EAAE,CAAA;IACzB,IAAM,gBAAgB,GAAG,IAAI,UAAU,EAAQ,CAAA;IAE/C,IAAM,cAAc,GAAG;QACrB,UAAU,EAAE,cAAM,OAAA,SAAS,CAAC,OAAO,CAAC,EAAlB,CAAkB;QAEpC,UAAU,EAAE,UAAC,UAAmB;YAC9B,IAAI,OAAO,CAAC,UAAU,CAAC,KAAK,QAAQ,EAAE,CAAC;gBACrC,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAA;gBAC9B,mBAAmB,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAA;YACjD,CAAC;iBAAM,CAAC;gBACN,cAAc,CAAC,YAAY,EAAE,CAAA;YAC/B,CAAC;YACD,gBAAgB,CAAC,MAAM,EAAE,CAAA;QAC3B,CAAC;QAED,kBAAkB,EAAE,UAAC,GAAW,EAAE,QAAa;YAC7C,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAA;YACjC,mBAAmB,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAA;YAC/C,gBAAgB,CAAC,MAAM,EAAE,CAAA;QAC3B,CAAC;QAED,qBAAqB,EAAE,UAAC,GAAW;YACjC,OAAO,OAAO,CAAC,GAAG,CAAC,CAAA;YACnB,mBAAmB,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAA;YAC/C,gBAAgB,CAAC,MAAM,EAAE,CAAA;QAC3B,CAAC;QAED,YAAY,EAAE;YACZ,OAAO,GAAG,EAAE,CAAA;YACZ,mBAAmB,CAAC,iBAAiB,EAAE,CAAA;YACvC,gBAAgB,CAAC,MAAM,EAAE,CAAA;QAC3B,CAAC;QAED,gBAAgB,kBAAA;KACjB,CAAA;IACD,OAAO,cAAc,CAAA;AACvB,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type { Context } from '../../tools/serialisation/context';
|
|
2
|
-
import type { CustomerDataType } from './contextConstants';
|
|
3
|
-
export declare const CUSTOMER_DATA_BYTES_LIMIT: number;
|
|
4
|
-
export declare const CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT: number;
|
|
5
|
-
export declare const BYTES_COMPUTATION_THROTTLING_DELAY = 200;
|
|
6
|
-
export type CustomerDataTracker = ReturnType<typeof createCustomerDataTracker>;
|
|
7
|
-
export type CustomerDataTrackerManager = ReturnType<typeof createCustomerDataTrackerManager>;
|
|
8
|
-
export declare const enum CustomerDataCompressionStatus {
|
|
9
|
-
Unknown = 0,
|
|
10
|
-
Enabled = 1,
|
|
11
|
-
Disabled = 2
|
|
12
|
-
}
|
|
13
|
-
export declare function createCustomerDataTrackerManager(compressionStatus?: CustomerDataCompressionStatus): {
|
|
14
|
-
/**
|
|
15
|
-
* Creates a detached tracker. The manager will not store a reference to that tracker, and the
|
|
16
|
-
* bytes count will be counted independently from other detached trackers.
|
|
17
|
-
*
|
|
18
|
-
* This is particularly useful when we don't know when the tracker will be unused, so we don't
|
|
19
|
-
* leak memory (ex: when used in Logger instances).
|
|
20
|
-
*/
|
|
21
|
-
createDetachedTracker: () => {
|
|
22
|
-
updateCustomerData: (context: Context) => void;
|
|
23
|
-
resetCustomerData: () => void;
|
|
24
|
-
getBytesCount: () => number;
|
|
25
|
-
stop: () => void;
|
|
26
|
-
};
|
|
27
|
-
/**
|
|
28
|
-
* Creates a tracker if it doesn't exist, and returns it.
|
|
29
|
-
*/
|
|
30
|
-
getOrCreateTracker: (type: CustomerDataType) => {
|
|
31
|
-
updateCustomerData: (context: Context) => void;
|
|
32
|
-
resetCustomerData: () => void;
|
|
33
|
-
getBytesCount: () => number;
|
|
34
|
-
stop: () => void;
|
|
35
|
-
};
|
|
36
|
-
setCompressionStatus: (newCompressionStatus: CustomerDataCompressionStatus) => void;
|
|
37
|
-
getCompressionStatus: () => CustomerDataCompressionStatus;
|
|
38
|
-
stop: () => void;
|
|
39
|
-
};
|
|
40
|
-
export declare function createCustomerDataTracker(checkCustomerDataLimit: () => void): {
|
|
41
|
-
updateCustomerData: (context: Context) => void;
|
|
42
|
-
resetCustomerData: () => void;
|
|
43
|
-
getBytesCount: () => number;
|
|
44
|
-
stop: () => void;
|
|
45
|
-
};
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { ONE_KIBI_BYTE, computeBytesCount } from '../../tools/utils/byteUtils';
|
|
2
|
-
import { throttle } from '../../tools/utils/functionUtils';
|
|
3
|
-
import { jsonStringify } from '../../tools/serialisation/jsonStringify';
|
|
4
|
-
import { display } from '../../tools/display';
|
|
5
|
-
import { isEmptyObject } from '../../tools/utils/objectUtils';
|
|
6
|
-
// RUM and logs batch bytes limit is 16KB
|
|
7
|
-
// ensure that we leave room for other event attributes and maintain a decent amount of event per batch
|
|
8
|
-
// (3KB (customer data) + 1KB (other attributes)) * 4 (events per batch) = 16KB
|
|
9
|
-
export var CUSTOMER_DATA_BYTES_LIMIT = 3 * ONE_KIBI_BYTE;
|
|
10
|
-
// We observed that the compression ratio is around 8 in general, but we also want to keep a margin
|
|
11
|
-
// because some data might not be compressed (ex: last view update on page exit). We chose 16KiB
|
|
12
|
-
// because it is also the limit of the 'batchBytesCount' that we use for RUM and Logs data, but this
|
|
13
|
-
// is a bit arbitrary.
|
|
14
|
-
export var CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT = 16 * ONE_KIBI_BYTE;
|
|
15
|
-
export var BYTES_COMPUTATION_THROTTLING_DELAY = 200;
|
|
16
|
-
export function createCustomerDataTrackerManager(compressionStatus) {
|
|
17
|
-
if (compressionStatus === void 0) { compressionStatus = 2 /* CustomerDataCompressionStatus.Disabled */; }
|
|
18
|
-
var customerDataTrackers = new Map();
|
|
19
|
-
var alreadyWarned = false;
|
|
20
|
-
function checkCustomerDataLimit(initialBytesCount) {
|
|
21
|
-
if (initialBytesCount === void 0) { initialBytesCount = 0; }
|
|
22
|
-
if (alreadyWarned || compressionStatus === 0 /* CustomerDataCompressionStatus.Unknown */) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
var bytesCountLimit = compressionStatus === 2 /* CustomerDataCompressionStatus.Disabled */
|
|
26
|
-
? CUSTOMER_DATA_BYTES_LIMIT
|
|
27
|
-
: CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT;
|
|
28
|
-
var bytesCount = initialBytesCount;
|
|
29
|
-
customerDataTrackers.forEach(function (tracker) {
|
|
30
|
-
bytesCount += tracker.getBytesCount();
|
|
31
|
-
});
|
|
32
|
-
if (bytesCount > bytesCountLimit) {
|
|
33
|
-
displayCustomerDataLimitReachedWarning(bytesCountLimit);
|
|
34
|
-
alreadyWarned = true;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return {
|
|
38
|
-
/**
|
|
39
|
-
* Creates a detached tracker. The manager will not store a reference to that tracker, and the
|
|
40
|
-
* bytes count will be counted independently from other detached trackers.
|
|
41
|
-
*
|
|
42
|
-
* This is particularly useful when we don't know when the tracker will be unused, so we don't
|
|
43
|
-
* leak memory (ex: when used in Logger instances).
|
|
44
|
-
*/
|
|
45
|
-
createDetachedTracker: function () {
|
|
46
|
-
var tracker = createCustomerDataTracker(function () { return checkCustomerDataLimit(tracker.getBytesCount()); });
|
|
47
|
-
return tracker;
|
|
48
|
-
},
|
|
49
|
-
/**
|
|
50
|
-
* Creates a tracker if it doesn't exist, and returns it.
|
|
51
|
-
*/
|
|
52
|
-
getOrCreateTracker: function (type) {
|
|
53
|
-
if (!customerDataTrackers.has(type)) {
|
|
54
|
-
customerDataTrackers.set(type, createCustomerDataTracker(checkCustomerDataLimit));
|
|
55
|
-
}
|
|
56
|
-
return customerDataTrackers.get(type);
|
|
57
|
-
},
|
|
58
|
-
setCompressionStatus: function (newCompressionStatus) {
|
|
59
|
-
if (compressionStatus === 0 /* CustomerDataCompressionStatus.Unknown */) {
|
|
60
|
-
compressionStatus = newCompressionStatus;
|
|
61
|
-
checkCustomerDataLimit();
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
getCompressionStatus: function () { return compressionStatus; },
|
|
65
|
-
stop: function () {
|
|
66
|
-
customerDataTrackers.forEach(function (tracker) { return tracker.stop(); });
|
|
67
|
-
customerDataTrackers.clear();
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
export function createCustomerDataTracker(checkCustomerDataLimit) {
|
|
72
|
-
var bytesCountCache = 0;
|
|
73
|
-
// Throttle the bytes computation to minimize the impact on performance.
|
|
74
|
-
// Especially useful if the user call context APIs synchronously multiple times in a row
|
|
75
|
-
var _a = throttle(function (context) {
|
|
76
|
-
bytesCountCache = computeBytesCount(jsonStringify(context));
|
|
77
|
-
checkCustomerDataLimit();
|
|
78
|
-
}, BYTES_COMPUTATION_THROTTLING_DELAY), computeBytesCountThrottled = _a.throttled, cancelComputeBytesCount = _a.cancel;
|
|
79
|
-
var resetBytesCount = function () {
|
|
80
|
-
cancelComputeBytesCount();
|
|
81
|
-
bytesCountCache = 0;
|
|
82
|
-
};
|
|
83
|
-
return {
|
|
84
|
-
updateCustomerData: function (context) {
|
|
85
|
-
if (isEmptyObject(context)) {
|
|
86
|
-
resetBytesCount();
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
computeBytesCountThrottled(context);
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
resetCustomerData: resetBytesCount,
|
|
93
|
-
getBytesCount: function () { return bytesCountCache; },
|
|
94
|
-
stop: function () {
|
|
95
|
-
cancelComputeBytesCount();
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function displayCustomerDataLimitReachedWarning(bytesCountLimit) {
|
|
100
|
-
display.warn("Customer data exceeds the recommended ".concat(bytesCountLimit / ONE_KIBI_BYTE, "KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-threshold-warning"));
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=customerDataTracker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"customerDataTracker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,EAAE,kCAAkC,CAAC,EAHnB,0BAA0B,eAAA,EAAU,uBAAuB,YAGxC,CAAA;IAEtC,IAAM,eAAe,GAAG;QACtB,uBAAuB,EAAE,CAAA;QACzB,eAAe,GAAG,CAAC,CAAA;IACrB,CAAC,CAAA;IAED,OAAO;QACL,kBAAkB,EAAE,UAAC,OAAgB;YACnC,IAAI,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;gBAC3B,eAAe,EAAE,CAAA;YACnB,CAAC;iBAAM,CAAC;gBACN,0BAA0B,CAAC,OAAO,CAAC,CAAA;YACrC,CAAC;QACH,CAAC;QACD,iBAAiB,EAAE,eAAe;QAClC,aAAa,EAAE,cAAM,OAAA,eAAe,EAAf,CAAe;QACpC,IAAI,EAAE;YACJ,uBAAuB,EAAE,CAAA;QAC3B,CAAC;KACF,CAAA;AACH,CAAC;AAED,SAAS,sCAAsC,CAAC,eAAuB;IACrE,OAAO,CAAC,IAAI,CACV,gDACE,eAAe,GAAG,aAAa,kKAC8H,CAChK,CAAA;AACH,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Configuration } from '../configuration';
|
|
2
|
-
import type { ContextManager } from './contextManager';
|
|
3
|
-
import type { CustomerDataType } from './contextConstants';
|
|
4
|
-
export declare function storeContextManager(configuration: Configuration, contextManager: ContextManager, productKey: string, customerDataType: CustomerDataType): void;
|
|
5
|
-
export declare function buildStorageKey(productKey: string, customerDataType: CustomerDataType): string;
|
|
6
|
-
export declare function removeStorageListeners(): void;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { addEventListener, DOM_EVENT } from '../../browser/addEventListener';
|
|
2
|
-
import { combine } from '../../tools/mergeInto';
|
|
3
|
-
var CONTEXT_STORE_KEY_PREFIX = '_oo_c';
|
|
4
|
-
var storageListeners = [];
|
|
5
|
-
export function storeContextManager(configuration, contextManager, productKey, customerDataType) {
|
|
6
|
-
var storageKey = buildStorageKey(productKey, customerDataType);
|
|
7
|
-
storageListeners.push(addEventListener(configuration, window, DOM_EVENT.STORAGE, function (_a) {
|
|
8
|
-
var key = _a.key;
|
|
9
|
-
if (storageKey === key) {
|
|
10
|
-
synchronizeWithStorage();
|
|
11
|
-
}
|
|
12
|
-
}));
|
|
13
|
-
contextManager.changeObservable.subscribe(dumpToStorage);
|
|
14
|
-
contextManager.setContext(combine(getFromStorage(), contextManager.getContext()));
|
|
15
|
-
function synchronizeWithStorage() {
|
|
16
|
-
contextManager.setContext(getFromStorage());
|
|
17
|
-
}
|
|
18
|
-
function dumpToStorage() {
|
|
19
|
-
localStorage.setItem(storageKey, JSON.stringify(contextManager.getContext()));
|
|
20
|
-
}
|
|
21
|
-
function getFromStorage() {
|
|
22
|
-
var rawContext = localStorage.getItem(storageKey);
|
|
23
|
-
return rawContext !== null ? JSON.parse(rawContext) : {};
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export function buildStorageKey(productKey, customerDataType) {
|
|
27
|
-
return "".concat(CONTEXT_STORE_KEY_PREFIX, "_").concat(productKey, "_").concat(customerDataType);
|
|
28
|
-
}
|
|
29
|
-
export function removeStorageListeners() {
|
|
30
|
-
storageListeners.map(function (listener) { return listener.stop(); });
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=storeContextManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storeContextManager.js","sourceRoot":"","sources":["../../../src/domain/context/storeContextManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAG5E,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAI/C,IAAM,wBAAwB,GAAG,OAAO,CAAA;AAExC,IAAM,gBAAgB,GAAgC,EAAE,CAAA;AAExD,MAAM,UAAU,mBAAmB,CACjC,aAA4B,EAC5B,cAA8B,EAC9B,UAAkB,EAClB,gBAAkC;IAElC,IAAM,UAAU,GAAG,eAAe,CAAC,UAAU,EAAE,gBAAgB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js","sourceRoot":"","sources":["../../../src/domain/deflate/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { Encoder } from '../../tools/encoder';
|
|
2
|
-
export type DeflateWorkerAction = {
|
|
3
|
-
action: 'init';
|
|
4
|
-
} | {
|
|
5
|
-
action: 'write';
|
|
6
|
-
id: number;
|
|
7
|
-
streamId: number;
|
|
8
|
-
data: string;
|
|
9
|
-
} | {
|
|
10
|
-
action: 'reset';
|
|
11
|
-
streamId: number;
|
|
12
|
-
};
|
|
13
|
-
export type DeflateWorkerResponse = {
|
|
14
|
-
type: 'initialized';
|
|
15
|
-
version: string;
|
|
16
|
-
} | {
|
|
17
|
-
type: 'wrote';
|
|
18
|
-
id: number;
|
|
19
|
-
streamId: number;
|
|
20
|
-
result: Uint8Array;
|
|
21
|
-
trailer: Uint8Array;
|
|
22
|
-
additionalBytesCount: number;
|
|
23
|
-
} | {
|
|
24
|
-
type: 'errored';
|
|
25
|
-
streamId?: number;
|
|
26
|
-
error: Error | string;
|
|
27
|
-
};
|
|
28
|
-
export interface DeflateWorker extends Worker {
|
|
29
|
-
postMessage(message: DeflateWorkerAction): void;
|
|
30
|
-
}
|
|
31
|
-
export type DeflateEncoder = Encoder<Uint8Array> & {
|
|
32
|
-
stop: () => void;
|
|
33
|
-
};
|
|
34
|
-
export declare const enum DeflateEncoderStreamId {
|
|
35
|
-
REPLAY = 1,
|
|
36
|
-
RUM = 2,
|
|
37
|
-
RUM_REPLICA = 3
|
|
38
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/domain/deflate/types.ts"],"names":[],"mappings":""}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cross-browser stack trace computation.
|
|
3
|
-
*
|
|
4
|
-
* Reference implementation: https://github.com/csnover/TraceKit/blob/04530298073c3823de72deb0b97e7b38ca7bcb59/tracekit.js
|
|
5
|
-
*/
|
|
6
|
-
export interface StackFrame {
|
|
7
|
-
url?: string;
|
|
8
|
-
func?: string;
|
|
9
|
-
/** The arguments passed to the function, if known. */
|
|
10
|
-
args?: string[];
|
|
11
|
-
line?: number;
|
|
12
|
-
column?: number;
|
|
13
|
-
/** An array of source code lines; the middle element corresponds to the correct line. */
|
|
14
|
-
context?: string[];
|
|
15
|
-
}
|
|
16
|
-
export interface StackTrace {
|
|
17
|
-
name?: string;
|
|
18
|
-
message?: string;
|
|
19
|
-
url?: string;
|
|
20
|
-
stack: StackFrame[];
|
|
21
|
-
incomplete?: boolean;
|
|
22
|
-
partial?: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare function computeStackTrace(ex: unknown): StackTrace;
|
|
25
|
-
export declare function computeStackTraceFromOnErrorMessage(messageObj: unknown, url?: string, line?: number, column?: number): {
|
|
26
|
-
name: string | undefined;
|
|
27
|
-
message: string | undefined;
|
|
28
|
-
stack: {
|
|
29
|
-
url: string | undefined;
|
|
30
|
-
column: number | undefined;
|
|
31
|
-
line: number | undefined;
|
|
32
|
-
}[];
|
|
33
|
-
};
|