@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,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.processSessionStoreOperations = exports.LOCK_MAX_TRIES = exports.LOCK_RETRY_DELAY = void 0;
|
|
4
|
-
var timer_1 = require("../../tools/timer");
|
|
5
|
-
var stringUtils_1 = require("../../tools/utils/stringUtils");
|
|
6
|
-
var sessionState_1 = require("./sessionState");
|
|
7
|
-
exports.LOCK_RETRY_DELAY = 10;
|
|
8
|
-
exports.LOCK_MAX_TRIES = 100;
|
|
9
|
-
var bufferedOperations = [];
|
|
10
|
-
var ongoingOperations;
|
|
11
|
-
function processSessionStoreOperations(operations, sessionStoreStrategy, numberOfRetries) {
|
|
12
|
-
var _a;
|
|
13
|
-
if (numberOfRetries === void 0) { numberOfRetries = 0; }
|
|
14
|
-
var isLockEnabled = sessionStoreStrategy.isLockEnabled, retrieveSession = sessionStoreStrategy.retrieveSession, persistSession = sessionStoreStrategy.persistSession, clearSession = sessionStoreStrategy.clearSession;
|
|
15
|
-
if (!ongoingOperations) {
|
|
16
|
-
ongoingOperations = operations;
|
|
17
|
-
}
|
|
18
|
-
if (operations !== ongoingOperations) {
|
|
19
|
-
bufferedOperations.push(operations);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (isLockEnabled && numberOfRetries >= exports.LOCK_MAX_TRIES) {
|
|
23
|
-
next(sessionStoreStrategy);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
var currentLock;
|
|
27
|
-
var currentSession = retrieveSession();
|
|
28
|
-
if (isLockEnabled) {
|
|
29
|
-
// if someone has lock, retry later
|
|
30
|
-
if (currentSession.lock) {
|
|
31
|
-
retryLater(operations, sessionStoreStrategy, numberOfRetries);
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
// acquire lock
|
|
35
|
-
currentLock = (0, stringUtils_1.generateUUID)();
|
|
36
|
-
currentSession.lock = currentLock;
|
|
37
|
-
persistSession(currentSession);
|
|
38
|
-
// if lock is not acquired, retry later
|
|
39
|
-
currentSession = retrieveSession();
|
|
40
|
-
if (currentSession.lock !== currentLock) {
|
|
41
|
-
retryLater(operations, sessionStoreStrategy, numberOfRetries);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
var processedSession = operations.process(currentSession);
|
|
46
|
-
if (isLockEnabled) {
|
|
47
|
-
// if lock corrupted after process, retry later
|
|
48
|
-
currentSession = retrieveSession();
|
|
49
|
-
if (currentSession.lock !== currentLock) {
|
|
50
|
-
retryLater(operations, sessionStoreStrategy, numberOfRetries);
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
if (processedSession) {
|
|
55
|
-
if ((0, sessionState_1.isSessionInExpiredState)(processedSession)) {
|
|
56
|
-
clearSession();
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
(0, sessionState_1.expandSessionState)(processedSession);
|
|
60
|
-
persistSession(processedSession);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (isLockEnabled) {
|
|
64
|
-
// correctly handle lock around expiration would require to handle this case properly at several levels
|
|
65
|
-
// since we don't have evidence of lock issues around expiration, let's just not do the corruption check for it
|
|
66
|
-
if (!(processedSession && (0, sessionState_1.isSessionInExpiredState)(processedSession))) {
|
|
67
|
-
// if lock corrupted after persist, retry later
|
|
68
|
-
currentSession = retrieveSession();
|
|
69
|
-
if (currentSession.lock !== currentLock) {
|
|
70
|
-
retryLater(operations, sessionStoreStrategy, numberOfRetries);
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
delete currentSession.lock;
|
|
74
|
-
persistSession(currentSession);
|
|
75
|
-
processedSession = currentSession;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
// call after even if session is not persisted in order to perform operations on
|
|
79
|
-
// up-to-date session state value => the value could have been modified by another tab
|
|
80
|
-
(_a = operations.after) === null || _a === void 0 ? void 0 : _a.call(operations, processedSession || currentSession);
|
|
81
|
-
next(sessionStoreStrategy);
|
|
82
|
-
}
|
|
83
|
-
exports.processSessionStoreOperations = processSessionStoreOperations;
|
|
84
|
-
function retryLater(operations, sessionStore, currentNumberOfRetries) {
|
|
85
|
-
(0, timer_1.setTimeout)(function () {
|
|
86
|
-
processSessionStoreOperations(operations, sessionStore, currentNumberOfRetries + 1);
|
|
87
|
-
}, exports.LOCK_RETRY_DELAY);
|
|
88
|
-
}
|
|
89
|
-
function next(sessionStore) {
|
|
90
|
-
ongoingOperations = undefined;
|
|
91
|
-
var nextOperations = bufferedOperations.shift();
|
|
92
|
-
if (nextOperations) {
|
|
93
|
-
processSessionStoreOperations(nextOperations, sessionStore);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=sessionStoreOperations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionStoreOperations.js","sourceRoot":"","sources":["../../../src/domain/session/sessionStoreOperations.ts"],"names":[],"mappings":";;;AAAA,2CAA8C;AAC9C,6DAA4D;AAG5D,+CAA4E;AAO/D,QAAA,gBAAgB,GAAG,EAAE,CAAA;AACrB,QAAA,cAAc,GAAG,GAAG,CAAA;AACjC,IAAM,kBAAkB,GAAiB,EAAE,CAAA;AAC3C,IAAI,iBAAyC,CAAA;AAE7C,SAAgB,6BAA6B,CAC3C,UAAsB,EACtB,oBAA0C,EAC1C,eAAmB;;IAAnB,gCAAA,EAAA,mBAAmB;IAEX,IAAA,aAAa,GAAoD,oBAAoB,cAAxE,EAAE,eAAe,GAAmC,oBAAoB,gBAAvD,EAAE,cAAc,GAAmB,oBAAoB,eAAvC,EAAE,YAAY,GAAK,oBAAoB,aAAzB,CAAyB;IAE7F,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,iBAAiB,GAAG,UAAU,CAAA;IAChC,CAAC;IACD,IAAI,UAAU,KAAK,iBAAiB,EAAE,CAAC;QACrC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;QACnC,OAAM;IACR,CAAC;IACD,IAAI,aAAa,IAAI,eAAe,IAAI,sBAAc,EAAE,CAAC;QACvD,IAAI,CAAC,oBAAoB,CAAC,CAAA;QAC1B,OAAM;IACR,CAAC;IACD,IAAI,WAAmB,CAAA;IACvB,IAAI,cAAc,GAAG,eAAe,EAAE,CAAA;IACtC,IAAI,aAAa,EAAE,CAAC;QAClB,mCAAmC;QACnC,IAAI,cAAc,CAAC,IAAI,EAAE,CAAC;YACxB,UAAU,CAAC,UAAU,EAAE,oBAAoB,EAAE,eAAe,CAAC,CAAA;YAC7D,OAAM;QACR,CAAC;QACD,eAAe;QACf,WAAW,GAAG,IAAA,0BAAY,GAAE,CAAA;QAC5B,cAAc,CAAC,IAAI,GAAG,WAAW,CAAA;QACjC,cAAc,CAAC,cAAc,CAAC,CAAA;QAC9B,uCAAuC;QACvC,cAAc,GAAG,eAAe,EAAE,CAAA;QAClC,IAAI,cAAc,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;YACxC,UAAU,CAAC,UAAU,EAAE,oBAAoB,EAAE,eAAe,CAAC,CAAA;YAC7D,OAAM;QACR,CAAC;IACH,CAAC;IACD,IAAI,gBAAgB,GAAG,UAAU,CAAC,OAAO,CAAC,cAAc,CAAC,CAAA;IACzD,IAAI,aAAa,EAAE,CAAC;QAClB,+CAA+C;QAC/C,cAAc,GAAG,eAAe,EAAE,CAAA;QAClC,IAAI,cAAc,CAAC,IAAI,KAAK,WAAY,EAAE,CAAC;YACzC,UAAU,CAAC,UAAU,EAAE,oBAAoB,EAAE,eAAe,CAAC,CAAA;YAC7D,OAAM;QACR,CAAC;IACH,CAAC;IACD,IAAI,gBAAgB,EAAE,CAAC;QACrB,IAAI,IAAA,sCAAuB,EAAC,gBAAgB,CAAC,EAAE,CAAC;YAC9C,YAAY,EAAE,CAAA;QAChB,CAAC;aAAM,CAAC;YACN,IAAA,iCAAkB,EAAC,gBAAgB,CAAC,CAAA;YACpC,cAAc,CAAC,gBAAgB,CAAC,CAAA;QAClC,CAAC;IACH,CAAC;IACD,IAAI,aAAa,EAAE,CAAC;QAClB,uGAAuG;QACvG,+GAA+G;QAC/G,IAAI,CAAC,CAAC,gBAAgB,IAAI,IAAA,sCAAuB,EAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC;YACrE,+CAA+C;YAC/C,cAAc,GAAG,eAAe,EAAE,CAAA;YAClC,IAAI,cAAc,CAAC,IAAI,KAAK,WAAY,EAAE,CAAC;gBACzC,UAAU,CAAC,UAAU,EAAE,oBAAoB,EAAE,eAAe,CAAC,CAAA;gBAC7D,OAAM;YACR,CAAC;YACD,OAAO,cAAc,CAAC,IAAI,CAAA;YAC1B,cAAc,CAAC,cAAc,CAAC,CAAA;YAC9B,gBAAgB,GAAG,cAAc,CAAA;QACnC,CAAC;IACH,CAAC;IACD,gFAAgF;IAChF,sFAAsF;IACtF,MAAA,UAAU,CAAC,KAAK,2DAAG,gBAAgB,IAAI,cAAc,CAAC,CAAA;IACtD,IAAI,CAAC,oBAAoB,CAAC,CAAA;AAC5B,CAAC;AAzED,sEAyEC;AAED,SAAS,UAAU,CAAC,UAAsB,EAAE,YAAkC,EAAE,sBAA8B;IAC5G,IAAA,kBAAU,EAAC;QACT,6BAA6B,CAAC,UAAU,EAAE,YAAY,EAAE,sBAAsB,GAAG,CAAC,CAAC,CAAA;IACrF,CAAC,EAAE,wBAAgB,CAAC,CAAA;AACtB,CAAC;AAED,SAAS,IAAI,CAAC,YAAkC;IAC9C,iBAAiB,GAAG,SAAS,CAAA;IAC7B,IAAM,cAAc,GAAG,kBAAkB,CAAC,KAAK,EAAE,CAAA;IACjD,IAAI,cAAc,EAAE,CAAC;QACnB,6BAA6B,CAAC,cAAc,EAAE,YAAY,CAAC,CAAA;IAC7D,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { CookieOptions } from '../../../browser/cookie';
|
|
2
|
-
import type { InitConfiguration } from '../../configuration';
|
|
3
|
-
import type { SessionStoreStrategy, SessionStoreStrategyType } from './sessionStoreStrategy';
|
|
4
|
-
export declare function selectCookieStrategy(initConfiguration: InitConfiguration): SessionStoreStrategyType | undefined;
|
|
5
|
-
export declare function initCookieStrategy(cookieOptions: CookieOptions): SessionStoreStrategy;
|
|
6
|
-
export declare function buildCookieOptions(initConfiguration: InitConfiguration): CookieOptions;
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildCookieOptions = exports.initCookieStrategy = exports.selectCookieStrategy = void 0;
|
|
4
|
-
var browserDetection_1 = require("../../../tools/utils/browserDetection");
|
|
5
|
-
var cookie_1 = require("../../../browser/cookie");
|
|
6
|
-
var oldCookiesMigration_1 = require("../oldCookiesMigration");
|
|
7
|
-
var sessionConstants_1 = require("../sessionConstants");
|
|
8
|
-
var sessionState_1 = require("../sessionState");
|
|
9
|
-
var sessionStoreStrategy_1 = require("./sessionStoreStrategy");
|
|
10
|
-
function selectCookieStrategy(initConfiguration) {
|
|
11
|
-
var cookieOptions = buildCookieOptions(initConfiguration);
|
|
12
|
-
return (0, cookie_1.areCookiesAuthorized)(cookieOptions) ? { type: 'Cookie', cookieOptions: cookieOptions } : undefined;
|
|
13
|
-
}
|
|
14
|
-
exports.selectCookieStrategy = selectCookieStrategy;
|
|
15
|
-
function initCookieStrategy(cookieOptions) {
|
|
16
|
-
var cookieStore = {
|
|
17
|
-
/**
|
|
18
|
-
* Lock strategy allows mitigating issues due to concurrent access to cookie.
|
|
19
|
-
* This issue concerns only chromium browsers and enabling this on firefox increases cookie write failures.
|
|
20
|
-
*/
|
|
21
|
-
isLockEnabled: (0, browserDetection_1.isChromium)(),
|
|
22
|
-
persistSession: persistSessionCookie(cookieOptions),
|
|
23
|
-
retrieveSession: retrieveSessionCookie,
|
|
24
|
-
clearSession: deleteSessionCookie(cookieOptions),
|
|
25
|
-
};
|
|
26
|
-
(0, oldCookiesMigration_1.tryOldCookiesMigration)(cookieStore);
|
|
27
|
-
return cookieStore;
|
|
28
|
-
}
|
|
29
|
-
exports.initCookieStrategy = initCookieStrategy;
|
|
30
|
-
function persistSessionCookie(options) {
|
|
31
|
-
return function (session) {
|
|
32
|
-
(0, cookie_1.setCookie)(sessionStoreStrategy_1.SESSION_STORE_KEY, (0, sessionState_1.toSessionString)(session), sessionConstants_1.SESSION_EXPIRATION_DELAY, options);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function retrieveSessionCookie() {
|
|
36
|
-
var sessionString = (0, cookie_1.getCookie)(sessionStoreStrategy_1.SESSION_STORE_KEY);
|
|
37
|
-
return (0, sessionState_1.toSessionState)(sessionString);
|
|
38
|
-
}
|
|
39
|
-
function deleteSessionCookie(options) {
|
|
40
|
-
return function () {
|
|
41
|
-
(0, cookie_1.deleteCookie)(sessionStoreStrategy_1.SESSION_STORE_KEY, options);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function buildCookieOptions(initConfiguration) {
|
|
45
|
-
var cookieOptions = {};
|
|
46
|
-
cookieOptions.secure =
|
|
47
|
-
!!initConfiguration.useSecureSessionCookie ||
|
|
48
|
-
!!initConfiguration.usePartitionedCrossSiteSessionCookie ||
|
|
49
|
-
!!initConfiguration.useCrossSiteSessionCookie;
|
|
50
|
-
cookieOptions.crossSite =
|
|
51
|
-
!!initConfiguration.usePartitionedCrossSiteSessionCookie || !!initConfiguration.useCrossSiteSessionCookie;
|
|
52
|
-
cookieOptions.partitioned = !!initConfiguration.usePartitionedCrossSiteSessionCookie;
|
|
53
|
-
if (initConfiguration.trackSessionAcrossSubdomains) {
|
|
54
|
-
cookieOptions.domain = (0, cookie_1.getCurrentSite)();
|
|
55
|
-
}
|
|
56
|
-
return cookieOptions;
|
|
57
|
-
}
|
|
58
|
-
exports.buildCookieOptions = buildCookieOptions;
|
|
59
|
-
//# sourceMappingURL=sessionInCookie.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionInCookie.js","sourceRoot":"","sources":["../../../../src/domain/session/storeStrategies/sessionInCookie.ts"],"names":[],"mappings":";;;AAAA,0EAAkE;AAElE,kDAAkH;AAElH,8DAA+D;AAC/D,wDAA8D;AAE9D,gDAAiE;AAEjE,+DAA0D;AAE1D,SAAgB,oBAAoB,CAAC,iBAAoC;IACvE,IAAM,aAAa,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAA;IAC3D,OAAO,IAAA,6BAAoB,EAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,eAAA,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;AAC5F,CAAC;AAHD,oDAGC;AAED,SAAgB,kBAAkB,CAAC,aAA4B;IAC7D,IAAM,WAAW,GAAG;QAClB;;;WAGG;QACH,aAAa,EAAE,IAAA,6BAAU,GAAE;QAC3B,cAAc,EAAE,oBAAoB,CAAC,aAAa,CAAC;QACnD,eAAe,EAAE,qBAAqB;QACtC,YAAY,EAAE,mBAAmB,CAAC,aAAa,CAAC;KACjD,CAAA;IAED,IAAA,4CAAsB,EAAC,WAAW,CAAC,CAAA;IAEnC,OAAO,WAAW,CAAA;AACpB,CAAC;AAfD,gDAeC;AAED,SAAS,oBAAoB,CAAC,OAAsB;IAClD,OAAO,UAAC,OAAqB;QAC3B,IAAA,kBAAS,EAAC,wCAAiB,EAAE,IAAA,8BAAe,EAAC,OAAO,CAAC,EAAE,2CAAwB,EAAE,OAAO,CAAC,CAAA;IAC3F,CAAC,CAAA;AACH,CAAC;AAED,SAAS,qBAAqB;IAC5B,IAAM,aAAa,GAAG,IAAA,kBAAS,EAAC,wCAAiB,CAAC,CAAA;IAClD,OAAO,IAAA,6BAAc,EAAC,aAAa,CAAC,CAAA;AACtC,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAsB;IACjD,OAAO;QACL,IAAA,qBAAY,EAAC,wCAAiB,EAAE,OAAO,CAAC,CAAA;IAC1C,CAAC,CAAA;AACH,CAAC;AAED,SAAgB,kBAAkB,CAAC,iBAAoC;IACrE,IAAM,aAAa,GAAkB,EAAE,CAAA;IAEvC,aAAa,CAAC,MAAM;QAClB,CAAC,CAAC,iBAAiB,CAAC,sBAAsB;YAC1C,CAAC,CAAC,iBAAiB,CAAC,oCAAoC;YACxD,CAAC,CAAC,iBAAiB,CAAC,yBAAyB,CAAA;IAC/C,aAAa,CAAC,SAAS;QACrB,CAAC,CAAC,iBAAiB,CAAC,oCAAoC,IAAI,CAAC,CAAC,iBAAiB,CAAC,yBAAyB,CAAA;IAC3G,aAAa,CAAC,WAAW,GAAG,CAAC,CAAC,iBAAiB,CAAC,oCAAoC,CAAA;IAEpF,IAAI,iBAAiB,CAAC,4BAA4B,EAAE,CAAC;QACnD,aAAa,CAAC,MAAM,GAAG,IAAA,uBAAc,GAAE,CAAA;IACzC,CAAC;IAED,OAAO,aAAa,CAAA;AACtB,CAAC;AAhBD,gDAgBC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.initLocalStorageStrategy = exports.selectLocalStorageStrategy = void 0;
|
|
4
|
-
var stringUtils_1 = require("../../../tools/utils/stringUtils");
|
|
5
|
-
var sessionState_1 = require("../sessionState");
|
|
6
|
-
var sessionStoreStrategy_1 = require("./sessionStoreStrategy");
|
|
7
|
-
var LOCAL_STORAGE_TEST_KEY = '_oo_test_';
|
|
8
|
-
function selectLocalStorageStrategy() {
|
|
9
|
-
try {
|
|
10
|
-
var id = (0, stringUtils_1.generateUUID)();
|
|
11
|
-
var testKey = "".concat(LOCAL_STORAGE_TEST_KEY).concat(id);
|
|
12
|
-
localStorage.setItem(testKey, id);
|
|
13
|
-
var retrievedId = localStorage.getItem(testKey);
|
|
14
|
-
localStorage.removeItem(testKey);
|
|
15
|
-
return id === retrievedId ? { type: 'LocalStorage' } : undefined;
|
|
16
|
-
}
|
|
17
|
-
catch (e) {
|
|
18
|
-
return undefined;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.selectLocalStorageStrategy = selectLocalStorageStrategy;
|
|
22
|
-
function initLocalStorageStrategy() {
|
|
23
|
-
return {
|
|
24
|
-
isLockEnabled: false,
|
|
25
|
-
persistSession: persistInLocalStorage,
|
|
26
|
-
retrieveSession: retrieveSessionFromLocalStorage,
|
|
27
|
-
clearSession: clearSessionFromLocalStorage,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
exports.initLocalStorageStrategy = initLocalStorageStrategy;
|
|
31
|
-
function persistInLocalStorage(sessionState) {
|
|
32
|
-
localStorage.setItem(sessionStoreStrategy_1.SESSION_STORE_KEY, (0, sessionState_1.toSessionString)(sessionState));
|
|
33
|
-
}
|
|
34
|
-
function retrieveSessionFromLocalStorage() {
|
|
35
|
-
var sessionString = localStorage.getItem(sessionStoreStrategy_1.SESSION_STORE_KEY);
|
|
36
|
-
return (0, sessionState_1.toSessionState)(sessionString);
|
|
37
|
-
}
|
|
38
|
-
function clearSessionFromLocalStorage() {
|
|
39
|
-
localStorage.removeItem(sessionStoreStrategy_1.SESSION_STORE_KEY);
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=sessionInLocalStorage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionInLocalStorage.js","sourceRoot":"","sources":["../../../../src/domain/session/storeStrategies/sessionInLocalStorage.ts"],"names":[],"mappings":";;;AAAA,gEAA+D;AAE/D,gDAAiE;AAEjE,+DAA0D;AAE1D,IAAM,sBAAsB,GAAG,WAAW,CAAA;AAE1C,SAAgB,0BAA0B;IACxC,IAAI,CAAC;QACH,IAAM,EAAE,GAAG,IAAA,0BAAY,GAAE,CAAA;QACzB,IAAM,OAAO,GAAG,UAAG,sBAAsB,SAAG,EAAE,CAAE,CAAA;QAChD,YAAY,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;QACjC,IAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QACjD,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAA;QAChC,OAAO,EAAE,KAAK,WAAW,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;IAClE,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,SAAS,CAAA;IAClB,CAAC;AACH,CAAC;AAXD,gEAWC;AAED,SAAgB,wBAAwB;IACtC,OAAO;QACL,aAAa,EAAE,KAAK;QACpB,cAAc,EAAE,qBAAqB;QACrC,eAAe,EAAE,+BAA+B;QAChD,YAAY,EAAE,4BAA4B;KAC3C,CAAA;AACH,CAAC;AAPD,4DAOC;AAED,SAAS,qBAAqB,CAAC,YAA0B;IACvD,YAAY,CAAC,OAAO,CAAC,wCAAiB,EAAE,IAAA,8BAAe,EAAC,YAAY,CAAC,CAAC,CAAA;AACxE,CAAC;AAED,SAAS,+BAA+B;IACtC,IAAM,aAAa,GAAG,YAAY,CAAC,OAAO,CAAC,wCAAiB,CAAC,CAAA;IAC7D,OAAO,IAAA,6BAAc,EAAC,aAAa,CAAC,CAAA;AACtC,CAAC;AAED,SAAS,4BAA4B;IACnC,YAAY,CAAC,UAAU,CAAC,wCAAiB,CAAC,CAAA;AAC5C,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { CookieOptions } from '../../../browser/cookie';
|
|
2
|
-
import type { SessionState } from '../sessionState';
|
|
3
|
-
export declare const SESSION_STORE_KEY = "_oo_s";
|
|
4
|
-
export type SessionStoreStrategyType = {
|
|
5
|
-
type: 'Cookie';
|
|
6
|
-
cookieOptions: CookieOptions;
|
|
7
|
-
} | {
|
|
8
|
-
type: 'LocalStorage';
|
|
9
|
-
};
|
|
10
|
-
export interface SessionStoreStrategy {
|
|
11
|
-
isLockEnabled: boolean;
|
|
12
|
-
persistSession: (session: SessionState) => void;
|
|
13
|
-
retrieveSession: () => SessionState;
|
|
14
|
-
clearSession: () => void;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionStoreStrategy.js","sourceRoot":"","sources":["../../../../src/domain/session/storeStrategies/sessionStoreStrategy.ts"],"names":[],"mappings":";;;AAGa,QAAA,iBAAiB,GAAG,OAAO,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare const SYNTHETICS_TEST_ID_COOKIE_NAME = "openobserve-synthetics-public-id";
|
|
2
|
-
export declare const SYNTHETICS_RESULT_ID_COOKIE_NAME = "openobserve-synthetics-result-id";
|
|
3
|
-
export declare const SYNTHETICS_INJECTS_RUM_COOKIE_NAME = "openobserve-synthetics-injects-rum";
|
|
4
|
-
export interface BrowserWindow extends Window {
|
|
5
|
-
_OO_SYNTHETICS_PUBLIC_ID?: unknown;
|
|
6
|
-
_OO_SYNTHETICS_RESULT_ID?: unknown;
|
|
7
|
-
_OO_SYNTHETICS_INJECTS_RUM?: unknown;
|
|
8
|
-
}
|
|
9
|
-
export declare function willSyntheticsInjectRum(): boolean;
|
|
10
|
-
export declare function getSyntheticsTestId(): string | undefined;
|
|
11
|
-
export declare function getSyntheticsResultId(): string | undefined;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSyntheticsResultId = exports.getSyntheticsTestId = exports.willSyntheticsInjectRum = exports.SYNTHETICS_INJECTS_RUM_COOKIE_NAME = exports.SYNTHETICS_RESULT_ID_COOKIE_NAME = exports.SYNTHETICS_TEST_ID_COOKIE_NAME = void 0;
|
|
4
|
-
var cookie_1 = require("../../browser/cookie");
|
|
5
|
-
exports.SYNTHETICS_TEST_ID_COOKIE_NAME = 'openobserve-synthetics-public-id';
|
|
6
|
-
exports.SYNTHETICS_RESULT_ID_COOKIE_NAME = 'openobserve-synthetics-result-id';
|
|
7
|
-
exports.SYNTHETICS_INJECTS_RUM_COOKIE_NAME = 'openobserve-synthetics-injects-rum';
|
|
8
|
-
function willSyntheticsInjectRum() {
|
|
9
|
-
return Boolean(window._OO_SYNTHETICS_INJECTS_RUM || (0, cookie_1.getInitCookie)(exports.SYNTHETICS_INJECTS_RUM_COOKIE_NAME));
|
|
10
|
-
}
|
|
11
|
-
exports.willSyntheticsInjectRum = willSyntheticsInjectRum;
|
|
12
|
-
function getSyntheticsTestId() {
|
|
13
|
-
var value = window._OO_SYNTHETICS_PUBLIC_ID || (0, cookie_1.getInitCookie)(exports.SYNTHETICS_TEST_ID_COOKIE_NAME);
|
|
14
|
-
return typeof value === 'string' ? value : undefined;
|
|
15
|
-
}
|
|
16
|
-
exports.getSyntheticsTestId = getSyntheticsTestId;
|
|
17
|
-
function getSyntheticsResultId() {
|
|
18
|
-
var value = window._OO_SYNTHETICS_RESULT_ID || (0, cookie_1.getInitCookie)(exports.SYNTHETICS_RESULT_ID_COOKIE_NAME);
|
|
19
|
-
return typeof value === 'string' ? value : undefined;
|
|
20
|
-
}
|
|
21
|
-
exports.getSyntheticsResultId = getSyntheticsResultId;
|
|
22
|
-
//# sourceMappingURL=syntheticsWorkerValues.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syntheticsWorkerValues.js","sourceRoot":"","sources":["../../../src/domain/synthetics/syntheticsWorkerValues.ts"],"names":[],"mappings":";;;AAAA,+CAAoD;AAEvC,QAAA,8BAA8B,GAAG,kCAAkC,CAAA;AACnE,QAAA,gCAAgC,GAAG,kCAAkC,CAAA;AACrE,QAAA,kCAAkC,GAAG,oCAAoC,CAAA;AAQtF,SAAgB,uBAAuB;IACrC,OAAO,OAAO,CACX,MAAwB,CAAC,0BAA0B,IAAI,IAAA,sBAAa,EAAC,0CAAkC,CAAC,CAC1G,CAAA;AACH,CAAC;AAJD,0DAIC;AAED,SAAgB,mBAAmB;IACjC,IAAM,KAAK,GAAI,MAAwB,CAAC,wBAAwB,IAAI,IAAA,sBAAa,EAAC,sCAA8B,CAAC,CAAA;IACjH,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AACtD,CAAC;AAHD,kDAGC;AAED,SAAgB,qBAAqB;IACnC,IAAM,KAAK,GAAI,MAAwB,CAAC,wBAAwB,IAAI,IAAA,sBAAa,EAAC,wCAAgC,CAAC,CAAA;IACnH,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAA;AACtD,CAAC;AAHD,sDAGC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { Telemetry, TelemetryService, addTelemetryDebug, addTelemetryError, startFakeTelemetry, resetTelemetry, startTelemetry, isTelemetryReplicationAllowed, addTelemetryConfiguration, } from './telemetry';
|
|
2
|
-
export * from './rawTelemetryEvent.types';
|
|
3
|
-
export * from './telemetryEvent.types';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.addTelemetryConfiguration = exports.isTelemetryReplicationAllowed = exports.startTelemetry = exports.resetTelemetry = exports.startFakeTelemetry = exports.addTelemetryError = exports.addTelemetryDebug = void 0;
|
|
18
|
-
var telemetry_1 = require("./telemetry");
|
|
19
|
-
Object.defineProperty(exports, "addTelemetryDebug", { enumerable: true, get: function () { return telemetry_1.addTelemetryDebug; } });
|
|
20
|
-
Object.defineProperty(exports, "addTelemetryError", { enumerable: true, get: function () { return telemetry_1.addTelemetryError; } });
|
|
21
|
-
Object.defineProperty(exports, "startFakeTelemetry", { enumerable: true, get: function () { return telemetry_1.startFakeTelemetry; } });
|
|
22
|
-
Object.defineProperty(exports, "resetTelemetry", { enumerable: true, get: function () { return telemetry_1.resetTelemetry; } });
|
|
23
|
-
Object.defineProperty(exports, "startTelemetry", { enumerable: true, get: function () { return telemetry_1.startTelemetry; } });
|
|
24
|
-
Object.defineProperty(exports, "isTelemetryReplicationAllowed", { enumerable: true, get: function () { return telemetry_1.isTelemetryReplicationAllowed; } });
|
|
25
|
-
Object.defineProperty(exports, "addTelemetryConfiguration", { enumerable: true, get: function () { return telemetry_1.addTelemetryConfiguration; } });
|
|
26
|
-
__exportStar(require("./rawTelemetryEvent.types"), exports);
|
|
27
|
-
__exportStar(require("./telemetryEvent.types"), exports);
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/telemetry/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAUoB;AAPlB,8GAAA,iBAAiB,OAAA;AACjB,8GAAA,iBAAiB,OAAA;AACjB,+GAAA,kBAAkB,OAAA;AAClB,2GAAA,cAAc,OAAA;AACd,2GAAA,cAAc,OAAA;AACd,0HAAA,6BAA6B,OAAA;AAC7B,sHAAA,yBAAyB,OAAA;AAG3B,4DAAyC;AACzC,yDAAsC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TelemetryEvent, TelemetryConfigurationEvent } from './telemetryEvent.types';
|
|
2
|
-
export declare const TelemetryType: {
|
|
3
|
-
readonly log: "log";
|
|
4
|
-
readonly configuration: "configuration";
|
|
5
|
-
};
|
|
6
|
-
export declare const enum StatusType {
|
|
7
|
-
debug = "debug",
|
|
8
|
-
error = "error"
|
|
9
|
-
}
|
|
10
|
-
export interface RuntimeEnvInfo {
|
|
11
|
-
is_local_file: boolean;
|
|
12
|
-
is_worker: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type RawTelemetryEvent = TelemetryEvent['telemetry'];
|
|
15
|
-
export type RawTelemetryConfiguration = TelemetryConfigurationEvent['telemetry']['configuration'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"rawTelemetryEvent.types.js","sourceRoot":"","sources":["../../../src/domain/telemetry/rawTelemetryEvent.types.ts"],"names":[],"mappings":";;;AAEa,QAAA,aAAa,GAAG;IAC3B,GAAG,EAAE,KAAK;IACV,aAAa,EAAE,eAAe;CACtB,CAAA"}
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import type { Context } from '../../tools/serialisation/context';
|
|
2
|
-
import type { Configuration } from '../configuration';
|
|
3
|
-
import { Observable } from '../../tools/observable';
|
|
4
|
-
import type { StackTrace } from '../error/computeStackTrace';
|
|
5
|
-
import type { TelemetryEvent } from './telemetryEvent.types';
|
|
6
|
-
import type { RawTelemetryConfiguration } from './rawTelemetryEvent.types';
|
|
7
|
-
export declare const enum TelemetryService {
|
|
8
|
-
LOGS = "browser-logs-sdk",
|
|
9
|
-
RUM = "browser-rum-sdk"
|
|
10
|
-
}
|
|
11
|
-
export interface Telemetry {
|
|
12
|
-
setContextProvider: (provider: () => Context) => void;
|
|
13
|
-
observable: Observable<TelemetryEvent & Context>;
|
|
14
|
-
enabled: boolean;
|
|
15
|
-
}
|
|
16
|
-
export declare function startTelemetry(telemetryService: TelemetryService, configuration: Configuration): Telemetry;
|
|
17
|
-
export declare function startFakeTelemetry(): ({
|
|
18
|
-
[k: string]: unknown;
|
|
19
|
-
type?: "log" | undefined;
|
|
20
|
-
status: "error";
|
|
21
|
-
message: string;
|
|
22
|
-
error?: {
|
|
23
|
-
[k: string]: unknown;
|
|
24
|
-
stack?: string | undefined;
|
|
25
|
-
kind?: string | undefined;
|
|
26
|
-
} | undefined;
|
|
27
|
-
} | {
|
|
28
|
-
[k: string]: unknown;
|
|
29
|
-
type?: "log" | undefined;
|
|
30
|
-
status: "debug";
|
|
31
|
-
message: string;
|
|
32
|
-
} | {
|
|
33
|
-
[k: string]: unknown;
|
|
34
|
-
type: "configuration";
|
|
35
|
-
configuration: {
|
|
36
|
-
[k: string]: unknown;
|
|
37
|
-
session_sample_rate?: number | undefined;
|
|
38
|
-
telemetry_sample_rate?: number | undefined;
|
|
39
|
-
telemetry_configuration_sample_rate?: number | undefined;
|
|
40
|
-
trace_sample_rate?: number | undefined;
|
|
41
|
-
premium_sample_rate?: number | undefined;
|
|
42
|
-
replay_sample_rate?: number | undefined;
|
|
43
|
-
session_replay_sample_rate?: number | undefined;
|
|
44
|
-
start_session_replay_recording_manually?: boolean | undefined;
|
|
45
|
-
use_proxy?: boolean | undefined;
|
|
46
|
-
use_before_send?: boolean | undefined;
|
|
47
|
-
silent_multiple_init?: boolean | undefined;
|
|
48
|
-
track_session_across_subdomains?: boolean | undefined;
|
|
49
|
-
track_resources?: boolean | undefined;
|
|
50
|
-
track_long_task?: boolean | undefined;
|
|
51
|
-
use_cross_site_session_cookie?: boolean | undefined;
|
|
52
|
-
use_partitioned_cross_site_session_cookie?: boolean | undefined;
|
|
53
|
-
use_secure_session_cookie?: boolean | undefined;
|
|
54
|
-
allow_fallback_to_local_storage?: boolean | undefined;
|
|
55
|
-
store_contexts_across_pages?: boolean | undefined;
|
|
56
|
-
allow_untrusted_events?: boolean | undefined;
|
|
57
|
-
action_name_attribute?: string | undefined;
|
|
58
|
-
use_allowed_tracing_origins?: boolean | undefined;
|
|
59
|
-
use_allowed_tracing_urls?: boolean | undefined;
|
|
60
|
-
selected_tracing_propagators?: ("tracecontext" | "b3" | "b3multi")[] | undefined;
|
|
61
|
-
default_privacy_level?: string | undefined;
|
|
62
|
-
use_excluded_activity_urls?: boolean | undefined;
|
|
63
|
-
use_worker_url?: boolean | undefined;
|
|
64
|
-
track_frustrations?: boolean | undefined;
|
|
65
|
-
track_views_manually?: boolean | undefined;
|
|
66
|
-
track_interactions?: boolean | undefined;
|
|
67
|
-
track_user_interactions?: boolean | undefined;
|
|
68
|
-
forward_errors_to_logs?: boolean | undefined;
|
|
69
|
-
forward_console_logs?: string[] | "all" | undefined;
|
|
70
|
-
forward_reports?: string[] | "all" | undefined;
|
|
71
|
-
use_local_encryption?: boolean | undefined;
|
|
72
|
-
view_tracking_strategy?: "ActivityViewTrackingStrategy" | "FragmentViewTrackingStrategy" | "MixedViewTrackingStrategy" | "NavigationViewTrackingStrategy" | undefined;
|
|
73
|
-
track_background_events?: boolean | undefined;
|
|
74
|
-
mobile_vitals_update_period?: number | undefined;
|
|
75
|
-
track_errors?: boolean | undefined;
|
|
76
|
-
track_network_requests?: boolean | undefined;
|
|
77
|
-
use_tracing?: boolean | undefined;
|
|
78
|
-
track_native_views?: boolean | undefined;
|
|
79
|
-
track_native_errors?: boolean | undefined;
|
|
80
|
-
track_native_long_tasks?: boolean | undefined;
|
|
81
|
-
track_cross_platform_long_tasks?: boolean | undefined;
|
|
82
|
-
use_first_party_hosts?: boolean | undefined;
|
|
83
|
-
initialization_type?: string | undefined;
|
|
84
|
-
track_flutter_performance?: boolean | undefined;
|
|
85
|
-
batch_size?: number | undefined;
|
|
86
|
-
batch_upload_frequency?: number | undefined;
|
|
87
|
-
batch_processing_level?: number | undefined;
|
|
88
|
-
background_tasks_enabled?: boolean | undefined;
|
|
89
|
-
react_version?: string | undefined;
|
|
90
|
-
react_native_version?: string | undefined;
|
|
91
|
-
dart_version?: string | undefined;
|
|
92
|
-
};
|
|
93
|
-
})[];
|
|
94
|
-
export declare function resetTelemetry(): void;
|
|
95
|
-
/**
|
|
96
|
-
* Avoid mixing telemetry events from different data centers
|
|
97
|
-
* but keep replicating staging events for reliability
|
|
98
|
-
*/
|
|
99
|
-
export declare function isTelemetryReplicationAllowed(configuration: Configuration): boolean;
|
|
100
|
-
export declare function addTelemetryDebug(message: string, context?: Context): void;
|
|
101
|
-
export declare function addTelemetryError(e: unknown, context?: Context): void;
|
|
102
|
-
export declare function addTelemetryConfiguration(configuration: RawTelemetryConfiguration): void;
|
|
103
|
-
export declare function formatError(e: unknown): {
|
|
104
|
-
error: {
|
|
105
|
-
kind: string | undefined;
|
|
106
|
-
stack: string;
|
|
107
|
-
};
|
|
108
|
-
message: string;
|
|
109
|
-
} | {
|
|
110
|
-
error: {
|
|
111
|
-
stack: string;
|
|
112
|
-
kind?: undefined;
|
|
113
|
-
};
|
|
114
|
-
message: string;
|
|
115
|
-
};
|
|
116
|
-
export declare function scrubCustomerFrames(stackTrace: StackTrace): StackTrace;
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.scrubCustomerFrames = exports.formatError = exports.addTelemetryConfiguration = exports.addTelemetryError = exports.addTelemetryDebug = exports.isTelemetryReplicationAllowed = exports.resetTelemetry = exports.startFakeTelemetry = exports.startTelemetry = void 0;
|
|
4
|
-
var display_1 = require("../../tools/display");
|
|
5
|
-
var error_1 = require("../error/error");
|
|
6
|
-
var experimentalFeatures_1 = require("../../tools/experimentalFeatures");
|
|
7
|
-
var configuration_1 = require("../configuration");
|
|
8
|
-
var observable_1 = require("../../tools/observable");
|
|
9
|
-
var timeUtils_1 = require("../../tools/utils/timeUtils");
|
|
10
|
-
var monitor_1 = require("../../tools/monitor");
|
|
11
|
-
var sendToExtension_1 = require("../../tools/sendToExtension");
|
|
12
|
-
var polyfills_1 = require("../../tools/utils/polyfills");
|
|
13
|
-
var numberUtils_1 = require("../../tools/utils/numberUtils");
|
|
14
|
-
var jsonStringify_1 = require("../../tools/serialisation/jsonStringify");
|
|
15
|
-
var mergeInto_1 = require("../../tools/mergeInto");
|
|
16
|
-
var computeStackTrace_1 = require("../error/computeStackTrace");
|
|
17
|
-
var connectivity_1 = require("../connectivity");
|
|
18
|
-
var rawTelemetryEvent_types_1 = require("./rawTelemetryEvent.types");
|
|
19
|
-
var ALLOWED_FRAME_URLS = [
|
|
20
|
-
'http://localhost',
|
|
21
|
-
'<anonymous>',
|
|
22
|
-
];
|
|
23
|
-
var TELEMETRY_EXCLUDED_SITES = [configuration_1.INTAKE_SITE_US1_FED];
|
|
24
|
-
var telemetryConfiguration = { maxEventsPerPage: 0, sentEventCount: 0, telemetryEnabled: false, telemetryConfigurationEnabled: false };
|
|
25
|
-
var onRawTelemetryEventCollected;
|
|
26
|
-
function startTelemetry(telemetryService, configuration) {
|
|
27
|
-
var contextProvider;
|
|
28
|
-
var observable = new observable_1.Observable();
|
|
29
|
-
telemetryConfiguration.telemetryEnabled =
|
|
30
|
-
!(0, polyfills_1.includes)(TELEMETRY_EXCLUDED_SITES, configuration.site) && (0, numberUtils_1.performDraw)(configuration.telemetrySampleRate);
|
|
31
|
-
telemetryConfiguration.telemetryConfigurationEnabled =
|
|
32
|
-
telemetryConfiguration.telemetryEnabled && (0, numberUtils_1.performDraw)(configuration.telemetryConfigurationSampleRate);
|
|
33
|
-
var runtimeEnvInfo = getRuntimeEnvInfo();
|
|
34
|
-
onRawTelemetryEventCollected = function (rawEvent) {
|
|
35
|
-
if (telemetryConfiguration.telemetryEnabled) {
|
|
36
|
-
var event_1 = toTelemetryEvent(telemetryService, rawEvent, runtimeEnvInfo);
|
|
37
|
-
observable.notify(event_1);
|
|
38
|
-
(0, sendToExtension_1.sendToExtension)('telemetry', event_1);
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
(0, monitor_1.startMonitorErrorCollection)(addTelemetryError);
|
|
42
|
-
(0, polyfills_1.assign)(telemetryConfiguration, {
|
|
43
|
-
maxEventsPerPage: configuration.maxTelemetryEventsPerPage,
|
|
44
|
-
sentEventCount: 0,
|
|
45
|
-
});
|
|
46
|
-
function toTelemetryEvent(telemetryService, event, runtimeEnvInfo) {
|
|
47
|
-
return (0, mergeInto_1.combine)({
|
|
48
|
-
type: 'telemetry',
|
|
49
|
-
date: (0, timeUtils_1.timeStampNow)(),
|
|
50
|
-
service: telemetryService,
|
|
51
|
-
version: __BUILD_ENV__SDK_VERSION__,
|
|
52
|
-
source: 'browser',
|
|
53
|
-
_oo: {
|
|
54
|
-
format_version: 2,
|
|
55
|
-
},
|
|
56
|
-
telemetry: (0, mergeInto_1.combine)(event, {
|
|
57
|
-
runtime_env: runtimeEnvInfo,
|
|
58
|
-
connectivity: (0, connectivity_1.getConnectivity)(),
|
|
59
|
-
}),
|
|
60
|
-
experimental_features: (0, polyfills_1.arrayFrom)((0, experimentalFeatures_1.getExperimentalFeatures)()),
|
|
61
|
-
}, contextProvider !== undefined ? contextProvider() : {});
|
|
62
|
-
}
|
|
63
|
-
return {
|
|
64
|
-
setContextProvider: function (provider) {
|
|
65
|
-
contextProvider = provider;
|
|
66
|
-
},
|
|
67
|
-
observable: observable,
|
|
68
|
-
enabled: telemetryConfiguration.telemetryEnabled,
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
exports.startTelemetry = startTelemetry;
|
|
72
|
-
function getRuntimeEnvInfo() {
|
|
73
|
-
return {
|
|
74
|
-
is_local_file: window.location.protocol === 'file:',
|
|
75
|
-
is_worker: 'WorkerGlobalScope' in self,
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
function startFakeTelemetry() {
|
|
79
|
-
var events = [];
|
|
80
|
-
(0, polyfills_1.assign)(telemetryConfiguration, {
|
|
81
|
-
maxEventsPerPage: Infinity,
|
|
82
|
-
sentEventCount: 0,
|
|
83
|
-
});
|
|
84
|
-
onRawTelemetryEventCollected = function (event) {
|
|
85
|
-
events.push(event);
|
|
86
|
-
};
|
|
87
|
-
return events;
|
|
88
|
-
}
|
|
89
|
-
exports.startFakeTelemetry = startFakeTelemetry;
|
|
90
|
-
function resetTelemetry() {
|
|
91
|
-
onRawTelemetryEventCollected = undefined;
|
|
92
|
-
}
|
|
93
|
-
exports.resetTelemetry = resetTelemetry;
|
|
94
|
-
/**
|
|
95
|
-
* Avoid mixing telemetry events from different data centers
|
|
96
|
-
* but keep replicating staging events for reliability
|
|
97
|
-
*/
|
|
98
|
-
function isTelemetryReplicationAllowed(configuration) {
|
|
99
|
-
return configuration.site === configuration_1.INTAKE_SITE_STAGING;
|
|
100
|
-
}
|
|
101
|
-
exports.isTelemetryReplicationAllowed = isTelemetryReplicationAllowed;
|
|
102
|
-
function addTelemetryDebug(message, context) {
|
|
103
|
-
(0, monitor_1.displayIfDebugEnabled)(display_1.ConsoleApiName.debug, message, context);
|
|
104
|
-
addTelemetry((0, polyfills_1.assign)({
|
|
105
|
-
type: rawTelemetryEvent_types_1.TelemetryType.log,
|
|
106
|
-
message: message,
|
|
107
|
-
status: "debug" /* StatusType.debug */,
|
|
108
|
-
}, context));
|
|
109
|
-
}
|
|
110
|
-
exports.addTelemetryDebug = addTelemetryDebug;
|
|
111
|
-
function addTelemetryError(e, context) {
|
|
112
|
-
addTelemetry((0, polyfills_1.assign)({
|
|
113
|
-
type: rawTelemetryEvent_types_1.TelemetryType.log,
|
|
114
|
-
status: "error" /* StatusType.error */,
|
|
115
|
-
}, formatError(e), context));
|
|
116
|
-
}
|
|
117
|
-
exports.addTelemetryError = addTelemetryError;
|
|
118
|
-
function addTelemetryConfiguration(configuration) {
|
|
119
|
-
if (telemetryConfiguration.telemetryConfigurationEnabled) {
|
|
120
|
-
addTelemetry({
|
|
121
|
-
type: rawTelemetryEvent_types_1.TelemetryType.configuration,
|
|
122
|
-
configuration: configuration,
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
exports.addTelemetryConfiguration = addTelemetryConfiguration;
|
|
127
|
-
function addTelemetry(event) {
|
|
128
|
-
if (onRawTelemetryEventCollected && telemetryConfiguration.sentEventCount < telemetryConfiguration.maxEventsPerPage) {
|
|
129
|
-
telemetryConfiguration.sentEventCount += 1;
|
|
130
|
-
onRawTelemetryEventCollected(event);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
function formatError(e) {
|
|
134
|
-
if (e instanceof Error) {
|
|
135
|
-
var stackTrace = (0, computeStackTrace_1.computeStackTrace)(e);
|
|
136
|
-
return {
|
|
137
|
-
error: {
|
|
138
|
-
kind: stackTrace.name,
|
|
139
|
-
stack: (0, error_1.toStackTraceString)(scrubCustomerFrames(stackTrace)),
|
|
140
|
-
},
|
|
141
|
-
message: stackTrace.message,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
return {
|
|
145
|
-
error: {
|
|
146
|
-
stack: error_1.NO_ERROR_STACK_PRESENT_MESSAGE,
|
|
147
|
-
},
|
|
148
|
-
message: "".concat("Uncaught" /* NonErrorPrefix.UNCAUGHT */, " ").concat((0, jsonStringify_1.jsonStringify)(e)),
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
exports.formatError = formatError;
|
|
152
|
-
function scrubCustomerFrames(stackTrace) {
|
|
153
|
-
stackTrace.stack = stackTrace.stack.filter(function (frame) { return !frame.url || ALLOWED_FRAME_URLS.some(function (allowedFrameUrl) { return (0, polyfills_1.startsWith)(frame.url, allowedFrameUrl); }); });
|
|
154
|
-
return stackTrace;
|
|
155
|
-
}
|
|
156
|
-
exports.scrubCustomerFrames = scrubCustomerFrames;
|
|
157
|
-
//# sourceMappingURL=telemetry.js.map
|