@openobserve/browser-core 0.2.11 → 0.2.12-beta.13
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 +44 -35
- package/src/browser/{types.ts → browser.types.ts} +42 -0
- package/src/browser/cookie.ts +69 -15
- package/src/browser/fetchObservable.ts +97 -42
- package/src/browser/{pageExitObservable.ts → pageMayExitObservable.ts} +11 -24
- package/src/browser/runOnReadyState.ts +14 -4
- package/src/browser/xhrObservable.ts +45 -38
- package/src/domain/allowedTrackingOrigins.ts +30 -0
- package/src/domain/bufferedData.ts +32 -0
- package/src/domain/configuration/configuration.ts +366 -95
- package/src/domain/configuration/endpointBuilder.ts +48 -64
- package/src/domain/configuration/index.ts +6 -4
- package/src/domain/configuration/transportConfiguration.ts +42 -35
- package/src/domain/connectivity/connectivity.ts +31 -0
- package/src/domain/connectivity/index.ts +1 -0
- package/src/domain/console/consoleObservable.ts +59 -27
- package/src/domain/context/contextConstants.ts +27 -0
- package/src/domain/context/contextManager.ts +85 -0
- package/src/domain/context/contextUtils.ts +14 -0
- package/src/domain/context/defineContextMethod.ts +31 -0
- package/src/domain/context/storeContextManager.ts +55 -0
- 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} +18 -2
- package/src/domain/deflate/index.ts +1 -1
- package/src/domain/error/error.ts +28 -84
- package/src/domain/error/error.types.ts +21 -4
- package/src/domain/error/trackRuntimeError.ts +37 -8
- 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/browser.types.ts +12 -0
- package/src/domain/report/reportObservable.ts +37 -30
- package/src/domain/resourceUtils.ts +20 -16
- package/src/domain/session/README.md +193 -0
- package/src/domain/session/oldCookiesMigration.ts +7 -7
- 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 +51 -32
- package/src/domain/session/storeStrategies/sessionInCookie.ts +113 -23
- package/src/domain/session/storeStrategies/sessionInLocalStorage.ts +11 -8
- package/src/domain/session/storeStrategies/sessionStoreStrategy.ts +6 -2
- package/src/domain/synthetics/syntheticsWorkerValues.ts +15 -4
- package/src/domain/tags.ts +76 -0
- package/src/domain/telemetry/index.ts +12 -4
- package/src/domain/telemetry/rawTelemetryEvent.types.ts +11 -3
- package/src/domain/telemetry/telemetry.ts +242 -98
- package/src/domain/telemetry/telemetryEvent.types.ts +530 -5
- package/src/domain/trackingConsent.ts +34 -0
- package/src/index.ts +92 -55
- 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 +18 -13
- package/src/tools/encoder.ts +103 -0
- package/src/tools/experimentalFeatures.ts +18 -9
- package/src/tools/getZoneJsOriginalValue.ts +1 -1
- package/src/tools/{getGlobalObject.ts → globalObject.ts} +20 -0
- package/src/tools/instrumentMethod.ts +127 -66
- package/src/tools/matchOption.ts +1 -2
- package/src/tools/mergeInto.ts +16 -16
- package/src/tools/monitor.ts +14 -10
- package/src/tools/observable.ts +79 -15
- 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/tools/stackTrace/computeStackTrace.ts +250 -0
- 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 +35 -3
- 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 -110
- package/src/tools/utils/responseUtils.ts +1 -1
- package/src/tools/utils/stringUtils.ts +62 -4
- 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 +113 -61
- package/src/transport/eventBridge.ts +24 -5
- package/src/transport/flushController.ts +44 -23
- package/src/transport/httpRequest.ts +99 -71
- package/src/transport/index.ts +7 -4
- package/src/transport/sendWithRetryStrategy.ts +60 -41
- 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 -76
- package/cjs/browser/addEventListener.js +0 -52
- package/cjs/browser/addEventListener.js.map +0 -1
- package/cjs/browser/cookie.d.ts +0 -10
- package/cjs/browser/cookie.js +0 -69
- package/cjs/browser/cookie.js.map +0 -1
- package/cjs/browser/fetchObservable.d.ts +0 -23
- package/cjs/browser/fetchObservable.js +0 -74
- package/cjs/browser/fetchObservable.js.map +0 -1
- package/cjs/browser/pageExitObservable.d.ts +0 -14
- package/cjs/browser/pageExitObservable.js +0 -58
- 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 -22
- package/cjs/browser/xhrObservable.js +0 -93
- package/cjs/browser/xhrObservable.js.map +0 -1
- package/cjs/domain/configuration/configuration.d.ts +0 -67
- package/cjs/domain/configuration/configuration.js +0 -95
- package/cjs/domain/configuration/configuration.js.map +0 -1
- package/cjs/domain/configuration/endpointBuilder.d.ts +0 -14
- package/cjs/domain/configuration/endpointBuilder.js +0 -94
- package/cjs/domain/configuration/endpointBuilder.js.map +0 -1
- package/cjs/domain/configuration/index.d.ts +0 -3
- package/cjs/domain/configuration/index.js +0 -25
- 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/console/consoleObservable.d.ts +0 -11
- package/cjs/domain/console/consoleObservable.js +0 -75
- package/cjs/domain/console/consoleObservable.js.map +0 -1
- package/cjs/domain/deflate/index.d.ts +0 -1
- package/cjs/domain/deflate/index.js +0 -18
- package/cjs/domain/deflate/index.js.map +0 -1
- package/cjs/domain/deflate/types.d.ts +0 -26
- package/cjs/domain/deflate/types.js +0 -3
- package/cjs/domain/deflate/types.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 -5
- package/cjs/domain/error/trackRuntimeError.js +0 -21
- 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 -24
- 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 -15
- 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 -15
- package/cjs/domain/session/sessionStoreOperations.js +0 -104
- 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 -48
- 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 -40
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js.map +0 -1
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.d.ts +0 -14
- 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 -11
- 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 -112
- package/cjs/domain/telemetry/telemetry.js +0 -146
- package/cjs/domain/telemetry/telemetry.js.map +0 -1
- package/cjs/domain/telemetry/telemetryEvent.types.d.ts +0 -375
- package/cjs/domain/telemetry/telemetryEvent.types.js +0 -7
- package/cjs/domain/telemetry/telemetryEvent.types.js.map +0 -1
- package/cjs/domain/tracekit/computeStackTrace.d.ts +0 -5
- package/cjs/domain/tracekit/computeStackTrace.js +0 -118
- package/cjs/domain/tracekit/computeStackTrace.js.map +0 -1
- package/cjs/domain/tracekit/index.d.ts +0 -3
- package/cjs/domain/tracekit/index.js +0 -8
- package/cjs/domain/tracekit/index.js.map +0 -1
- package/cjs/domain/tracekit/tracekit.d.ts +0 -35
- package/cjs/domain/tracekit/tracekit.js +0 -95
- package/cjs/domain/tracekit/tracekit.js.map +0 -1
- package/cjs/domain/tracekit/types.d.ts +0 -44
- package/cjs/domain/tracekit/types.js +0 -3
- package/cjs/domain/tracekit/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/index.d.ts +0 -63
- package/cjs/index.js +0 -155
- package/cjs/index.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 -45
- package/cjs/tools/display.js.map +0 -1
- package/cjs/tools/experimentalFeatures.d.ts +0 -24
- package/cjs/tools/experimentalFeatures.js +0 -47
- 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 -19
- package/cjs/tools/instrumentMethod.js +0 -83
- 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 -9
- 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 -44
- 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/contextManager.d.ts +0 -21
- package/cjs/tools/serialisation/contextManager.js +0 -70
- package/cjs/tools/serialisation/contextManager.js.map +0 -1
- package/cjs/tools/serialisation/heavyCustomerDataWarning.d.ts +0 -8
- package/cjs/tools/serialisation/heavyCustomerDataWarning.js +0 -18
- package/cjs/tools/serialisation/heavyCustomerDataWarning.js.map +0 -1
- package/cjs/tools/serialisation/jsonStringify.d.ts +0 -14
- 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 -2
- package/cjs/tools/utils/browserDetection.js +0 -12
- 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 -7
- package/cjs/tools/utils/stringUtils.js +0 -32
- 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 -19
- package/cjs/transport/batch.js +0 -79
- 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 -48
- package/cjs/transport/flushController.js +0 -97
- package/cjs/transport/flushController.js.map +0 -1
- package/cjs/transport/httpRequest.d.ts +0 -37
- package/cjs/transport/httpRequest.js +0 -91
- 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 -15
- package/cjs/transport/startBatchWithReplica.js +0 -37
- 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 -76
- package/esm/browser/addEventListener.js +0 -47
- package/esm/browser/addEventListener.js.map +0 -1
- package/esm/browser/cookie.d.ts +0 -10
- package/esm/browser/cookie.js +0 -61
- package/esm/browser/cookie.js.map +0 -1
- package/esm/browser/fetchObservable.d.ts +0 -23
- package/esm/browser/fetchObservable.js +0 -70
- package/esm/browser/fetchObservable.js.map +0 -1
- package/esm/browser/pageExitObservable.d.ts +0 -14
- package/esm/browser/pageExitObservable.js +0 -53
- 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 -22
- package/esm/browser/xhrObservable.js +0 -89
- package/esm/browser/xhrObservable.js.map +0 -1
- package/esm/domain/configuration/configuration.d.ts +0 -67
- package/esm/domain/configuration/configuration.js +0 -90
- package/esm/domain/configuration/configuration.js.map +0 -1
- package/esm/domain/configuration/endpointBuilder.d.ts +0 -14
- package/esm/domain/configuration/endpointBuilder.js +0 -90
- package/esm/domain/configuration/endpointBuilder.js.map +0 -1
- package/esm/domain/configuration/index.d.ts +0 -3
- package/esm/domain/configuration/index.js +0 -4
- 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/console/consoleObservable.d.ts +0 -11
- package/esm/domain/console/consoleObservable.js +0 -70
- package/esm/domain/console/consoleObservable.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 -26
- package/esm/domain/deflate/types.js +0 -2
- package/esm/domain/deflate/types.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 -5
- package/esm/domain/error/trackRuntimeError.js +0 -17
- 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 -24
- 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 -15
- 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 -15
- package/esm/domain/session/sessionStoreOperations.js +0 -99
- 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 -42
- 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 -35
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js.map +0 -1
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.d.ts +0 -14
- 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 -11
- 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 -112
- package/esm/domain/telemetry/telemetry.js +0 -134
- package/esm/domain/telemetry/telemetry.js.map +0 -1
- package/esm/domain/telemetry/telemetryEvent.types.d.ts +0 -375
- package/esm/domain/telemetry/telemetryEvent.types.js +0 -6
- package/esm/domain/telemetry/telemetryEvent.types.js.map +0 -1
- package/esm/domain/tracekit/computeStackTrace.d.ts +0 -5
- package/esm/domain/tracekit/computeStackTrace.js +0 -114
- package/esm/domain/tracekit/computeStackTrace.js.map +0 -1
- package/esm/domain/tracekit/index.d.ts +0 -3
- package/esm/domain/tracekit/index.js +0 -3
- package/esm/domain/tracekit/index.js.map +0 -1
- package/esm/domain/tracekit/tracekit.d.ts +0 -35
- package/esm/domain/tracekit/tracekit.js +0 -91
- package/esm/domain/tracekit/tracekit.js.map +0 -1
- package/esm/domain/tracekit/types.d.ts +0 -44
- package/esm/domain/tracekit/types.js +0 -2
- package/esm/domain/tracekit/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 -63
- package/esm/index.js +0 -61
- 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 -41
- package/esm/tools/display.js.map +0 -1
- package/esm/tools/experimentalFeatures.d.ts +0 -24
- package/esm/tools/experimentalFeatures.js +0 -40
- 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 -19
- package/esm/tools/instrumentMethod.js +0 -77
- 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 -9
- 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 -40
- 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/contextManager.d.ts +0 -21
- package/esm/tools/serialisation/contextManager.js +0 -66
- package/esm/tools/serialisation/contextManager.js.map +0 -1
- package/esm/tools/serialisation/heavyCustomerDataWarning.d.ts +0 -8
- package/esm/tools/serialisation/heavyCustomerDataWarning.js +0 -14
- package/esm/tools/serialisation/heavyCustomerDataWarning.js.map +0 -1
- package/esm/tools/serialisation/jsonStringify.d.ts +0 -14
- 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 -2
- package/esm/tools/utils/browserDetection.js +0 -7
- 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 -7
- package/esm/tools/utils/stringUtils.js +0 -26
- 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 -19
- package/esm/transport/batch.js +0 -76
- 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 -48
- package/esm/transport/flushController.js +0 -93
- package/esm/transport/flushController.js.map +0 -1
- package/esm/transport/httpRequest.d.ts +0 -37
- package/esm/transport/httpRequest.js +0 -85
- 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 -15
- package/esm/transport/startBatchWithReplica.js +0 -33
- 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/tracekit/computeStackTrace.ts +0 -141
- package/src/domain/tracekit/index.ts +0 -3
- package/src/domain/tracekit/tracekit.ts +0 -96
- package/src/domain/tracekit/types.ts +0 -47
- 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/tools/serialisation/contextManager.ts +0 -79
- package/src/tools/serialisation/heavyCustomerDataWarning.ts +0 -26
- package/src/transport/startBatchWithReplica.ts +0 -52
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLinkElementOrigin = exports.getLocationOrigin = exports.buildUrl = exports.getHash = exports.getSearch = exports.getPathName = exports.getOrigin = exports.isValidUrl = exports.normalizeUrl = void 0;
|
|
4
|
-
var jsonStringify_1 = require("../serialisation/jsonStringify");
|
|
5
|
-
function normalizeUrl(url) {
|
|
6
|
-
return buildUrl(url, getLocationOrigin()).href;
|
|
7
|
-
}
|
|
8
|
-
exports.normalizeUrl = normalizeUrl;
|
|
9
|
-
function isValidUrl(url) {
|
|
10
|
-
try {
|
|
11
|
-
return !!buildUrl(url);
|
|
12
|
-
}
|
|
13
|
-
catch (_a) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
exports.isValidUrl = isValidUrl;
|
|
18
|
-
function getOrigin(url) {
|
|
19
|
-
return getLinkElementOrigin(buildUrl(url));
|
|
20
|
-
}
|
|
21
|
-
exports.getOrigin = getOrigin;
|
|
22
|
-
function getPathName(url) {
|
|
23
|
-
var pathname = buildUrl(url).pathname;
|
|
24
|
-
return pathname[0] === '/' ? pathname : "/".concat(pathname);
|
|
25
|
-
}
|
|
26
|
-
exports.getPathName = getPathName;
|
|
27
|
-
function getSearch(url) {
|
|
28
|
-
return buildUrl(url).search;
|
|
29
|
-
}
|
|
30
|
-
exports.getSearch = getSearch;
|
|
31
|
-
function getHash(url) {
|
|
32
|
-
return buildUrl(url).hash;
|
|
33
|
-
}
|
|
34
|
-
exports.getHash = getHash;
|
|
35
|
-
function buildUrl(url, base) {
|
|
36
|
-
var supportedURL = getSupportedUrl();
|
|
37
|
-
if (supportedURL) {
|
|
38
|
-
try {
|
|
39
|
-
return base !== undefined ? new supportedURL(url, base) : new supportedURL(url);
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
throw new Error("Failed to construct URL: ".concat(String(error), " ").concat((0, jsonStringify_1.jsonStringify)({ url: url, base: base })));
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (base === undefined && !/:/.test(url)) {
|
|
46
|
-
throw new Error("Invalid URL: '".concat(url, "'"));
|
|
47
|
-
}
|
|
48
|
-
var doc = document;
|
|
49
|
-
var anchorElement = doc.createElement('a');
|
|
50
|
-
if (base !== undefined) {
|
|
51
|
-
doc = document.implementation.createHTMLDocument('');
|
|
52
|
-
var baseElement = doc.createElement('base');
|
|
53
|
-
baseElement.href = base;
|
|
54
|
-
doc.head.appendChild(baseElement);
|
|
55
|
-
doc.body.appendChild(anchorElement);
|
|
56
|
-
}
|
|
57
|
-
anchorElement.href = url;
|
|
58
|
-
return anchorElement;
|
|
59
|
-
}
|
|
60
|
-
exports.buildUrl = buildUrl;
|
|
61
|
-
var originalURL = URL;
|
|
62
|
-
var isURLSupported;
|
|
63
|
-
function getSupportedUrl() {
|
|
64
|
-
if (isURLSupported === undefined) {
|
|
65
|
-
try {
|
|
66
|
-
var url = new originalURL('http://test/path');
|
|
67
|
-
isURLSupported = url.href === 'http://test/path';
|
|
68
|
-
}
|
|
69
|
-
catch (_a) {
|
|
70
|
-
isURLSupported = false;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return isURLSupported ? originalURL : undefined;
|
|
74
|
-
}
|
|
75
|
-
function getLocationOrigin() {
|
|
76
|
-
return getLinkElementOrigin(window.location);
|
|
77
|
-
}
|
|
78
|
-
exports.getLocationOrigin = getLocationOrigin;
|
|
79
|
-
/**
|
|
80
|
-
* Fallback
|
|
81
|
-
* On IE HTMLAnchorElement origin is not supported: https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/origin
|
|
82
|
-
* On Firefox window.location.origin is "null" for file: URIs: https://bugzilla.mozilla.org/show_bug.cgi?id=878297
|
|
83
|
-
*/
|
|
84
|
-
function getLinkElementOrigin(element) {
|
|
85
|
-
if (element.origin && element.origin !== 'null') {
|
|
86
|
-
return element.origin;
|
|
87
|
-
}
|
|
88
|
-
var sanitizedHost = element.host.replace(/(:80|:443)$/, '');
|
|
89
|
-
return "".concat(element.protocol, "//").concat(sanitizedHost);
|
|
90
|
-
}
|
|
91
|
-
exports.getLinkElementOrigin = getLinkElementOrigin;
|
|
92
|
-
//# sourceMappingURL=urlPolyfill.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"urlPolyfill.js","sourceRoot":"","sources":["../../../src/tools/utils/urlPolyfill.ts"],"names":[],"mappings":";;;AAAA,gEAA8D;AAE9D,SAAgB,YAAY,CAAC,GAAW;IACtC,OAAO,QAAQ,CAAC,GAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAA;AAChD,CAAC;AAFD,oCAEC;AAED,SAAgB,UAAU,CAAC,GAAW;IACpC,IAAI;QACF,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;KACvB;IAAC,WAAM;QACN,OAAO,KAAK,CAAA;KACb;AACH,CAAC;AAND,gCAMC;AAED,SAAgB,SAAS,CAAC,GAAW;IACnC,OAAO,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;AAC5C,CAAC;AAFD,8BAEC;AAED,SAAgB,WAAW,CAAC,GAAW;IACrC,IAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAA;IACvC,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC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AG,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,CAAA;QACjC,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,CAAA;KACpC;IACD,aAAa,CAAC,IAAI,GAAG,GAAG,CAAA;IACxB,OAAO,aAAa,CAAA;AACtB,CAAC;AAvBD,4BAuBC;AAED,IAAM,WAAW,GAAG,GAAG,CAAA;AACvB,IAAI,cAAmC,CAAA;AACvC,SAAS,eAAe;IACtB,IAAI,cAAc,KAAK,SAAS,EAAE;QAChC,IAAI;YACF,IAAM,GAAG,GAAG,IAAI,WAAW,CAAC,kBAAkB,CAAC,CAAA;YAC/C,cAAc,GAAG,GAAG,CAAC,IAAI,KAAK,kBAAkB,CAAA;SACjD;QAAC,WAAM;YACN,cAAc,GAAG,KAAK,CAAA;SACvB;KACF;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAA;AACjD,CAAC;AAED,SAAgB,iBAAiB;IAC/B,OAAO,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC9C,CAAC;AAFD,8CAEC;AAED;;;;GAIG;AACH,SAAgB,oBAAoB,CAAC,OAA2C;IAC9E,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE;QAC/C,OAAO,OAAO,CAAC,MAAM,CAAA;KACtB;IACD,IAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAA;IAC7D,OAAO,UAAG,OAAO,CAAC,QAAQ,eAAK,aAAa,CAAE,CAAA;AAChD,CAAC;AAND,oDAMC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { Duration, RelativeTime } from './utils/timeUtils';
|
|
2
|
-
export interface ValueHistoryEntry<T> {
|
|
3
|
-
startTime: RelativeTime;
|
|
4
|
-
endTime: RelativeTime;
|
|
5
|
-
value: T;
|
|
6
|
-
remove(): void;
|
|
7
|
-
close(endTime: RelativeTime): void;
|
|
8
|
-
}
|
|
9
|
-
export declare const CLEAR_OLD_VALUES_INTERVAL: number;
|
|
10
|
-
/**
|
|
11
|
-
* Store and keep track of values spans. This whole class assumes that values are added in
|
|
12
|
-
* chronological order (i.e. all entries have an increasing start time).
|
|
13
|
-
*/
|
|
14
|
-
export declare class ValueHistory<Value> {
|
|
15
|
-
private expireDelay;
|
|
16
|
-
private maxEntries?;
|
|
17
|
-
private entries;
|
|
18
|
-
private clearOldValuesInterval;
|
|
19
|
-
constructor(expireDelay: number, maxEntries?: number | undefined);
|
|
20
|
-
/**
|
|
21
|
-
* Add a value to the history associated with a start time. Returns a reference to this newly
|
|
22
|
-
* added entry that can be removed or closed.
|
|
23
|
-
*/
|
|
24
|
-
add(value: Value, startTime: RelativeTime): ValueHistoryEntry<Value>;
|
|
25
|
-
/**
|
|
26
|
-
* Return the latest value that was active during `startTime`, or the currently active value
|
|
27
|
-
* if no `startTime` is provided. This method assumes that entries are not overlapping.
|
|
28
|
-
*/
|
|
29
|
-
find(startTime?: RelativeTime): Value | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Helper function to close the currently active value, if any. This method assumes that entries
|
|
32
|
-
* are not overlapping.
|
|
33
|
-
*/
|
|
34
|
-
closeActive(endTime: RelativeTime): void;
|
|
35
|
-
/**
|
|
36
|
-
* Return all values with an active period overlapping with the duration,
|
|
37
|
-
* or all values that were active during `startTime` if no duration is provided,
|
|
38
|
-
* or all currently active values if no `startTime` is provided.
|
|
39
|
-
*/
|
|
40
|
-
findAll(startTime?: RelativeTime, duration?: Duration): Value[];
|
|
41
|
-
/**
|
|
42
|
-
* Remove all entries from this collection.
|
|
43
|
-
*/
|
|
44
|
-
reset(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Stop internal garbage collection of past entries.
|
|
47
|
-
*/
|
|
48
|
-
stop(): void;
|
|
49
|
-
private clearOldValues;
|
|
50
|
-
}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ValueHistory = exports.CLEAR_OLD_VALUES_INTERVAL = void 0;
|
|
4
|
-
var timer_1 = require("./timer");
|
|
5
|
-
var timeUtils_1 = require("./utils/timeUtils");
|
|
6
|
-
var END_OF_TIMES = Infinity;
|
|
7
|
-
exports.CLEAR_OLD_VALUES_INTERVAL = timeUtils_1.ONE_MINUTE;
|
|
8
|
-
/**
|
|
9
|
-
* Store and keep track of values spans. This whole class assumes that values are added in
|
|
10
|
-
* chronological order (i.e. all entries have an increasing start time).
|
|
11
|
-
*/
|
|
12
|
-
var ValueHistory = /** @class */ (function () {
|
|
13
|
-
function ValueHistory(expireDelay, maxEntries) {
|
|
14
|
-
var _this = this;
|
|
15
|
-
this.expireDelay = expireDelay;
|
|
16
|
-
this.maxEntries = maxEntries;
|
|
17
|
-
this.entries = [];
|
|
18
|
-
this.clearOldValuesInterval = (0, timer_1.setInterval)(function () { return _this.clearOldValues(); }, exports.CLEAR_OLD_VALUES_INTERVAL);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Add a value to the history associated with a start time. Returns a reference to this newly
|
|
22
|
-
* added entry that can be removed or closed.
|
|
23
|
-
*/
|
|
24
|
-
ValueHistory.prototype.add = function (value, startTime) {
|
|
25
|
-
var _this = this;
|
|
26
|
-
var entry = {
|
|
27
|
-
value: value,
|
|
28
|
-
startTime: startTime,
|
|
29
|
-
endTime: END_OF_TIMES,
|
|
30
|
-
remove: function () {
|
|
31
|
-
var index = _this.entries.indexOf(entry);
|
|
32
|
-
if (index >= 0) {
|
|
33
|
-
_this.entries.splice(index, 1);
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
close: function (endTime) {
|
|
37
|
-
entry.endTime = endTime;
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
if (this.maxEntries && this.entries.length >= this.maxEntries) {
|
|
41
|
-
this.entries.pop();
|
|
42
|
-
}
|
|
43
|
-
this.entries.unshift(entry);
|
|
44
|
-
return entry;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Return the latest value that was active during `startTime`, or the currently active value
|
|
48
|
-
* if no `startTime` is provided. This method assumes that entries are not overlapping.
|
|
49
|
-
*/
|
|
50
|
-
ValueHistory.prototype.find = function (startTime) {
|
|
51
|
-
if (startTime === void 0) { startTime = END_OF_TIMES; }
|
|
52
|
-
for (var _i = 0, _a = this.entries; _i < _a.length; _i++) {
|
|
53
|
-
var entry = _a[_i];
|
|
54
|
-
if (entry.startTime <= startTime) {
|
|
55
|
-
if (startTime <= entry.endTime) {
|
|
56
|
-
return entry.value;
|
|
57
|
-
}
|
|
58
|
-
break;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Helper function to close the currently active value, if any. This method assumes that entries
|
|
64
|
-
* are not overlapping.
|
|
65
|
-
*/
|
|
66
|
-
ValueHistory.prototype.closeActive = function (endTime) {
|
|
67
|
-
var latestEntry = this.entries[0];
|
|
68
|
-
if (latestEntry && latestEntry.endTime === END_OF_TIMES) {
|
|
69
|
-
latestEntry.close(endTime);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Return all values with an active period overlapping with the duration,
|
|
74
|
-
* or all values that were active during `startTime` if no duration is provided,
|
|
75
|
-
* or all currently active values if no `startTime` is provided.
|
|
76
|
-
*/
|
|
77
|
-
ValueHistory.prototype.findAll = function (startTime, duration) {
|
|
78
|
-
if (startTime === void 0) { startTime = END_OF_TIMES; }
|
|
79
|
-
if (duration === void 0) { duration = 0; }
|
|
80
|
-
var endTime = (0, timeUtils_1.addDuration)(startTime, duration);
|
|
81
|
-
return this.entries
|
|
82
|
-
.filter(function (entry) { return entry.startTime <= endTime && startTime <= entry.endTime; })
|
|
83
|
-
.map(function (entry) { return entry.value; });
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Remove all entries from this collection.
|
|
87
|
-
*/
|
|
88
|
-
ValueHistory.prototype.reset = function () {
|
|
89
|
-
this.entries = [];
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Stop internal garbage collection of past entries.
|
|
93
|
-
*/
|
|
94
|
-
ValueHistory.prototype.stop = function () {
|
|
95
|
-
(0, timer_1.clearInterval)(this.clearOldValuesInterval);
|
|
96
|
-
};
|
|
97
|
-
ValueHistory.prototype.clearOldValues = function () {
|
|
98
|
-
var oldTimeThreshold = (0, timeUtils_1.relativeNow)() - this.expireDelay;
|
|
99
|
-
while (this.entries.length > 0 && this.entries[this.entries.length - 1].endTime < oldTimeThreshold) {
|
|
100
|
-
this.entries.pop();
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
return ValueHistory;
|
|
104
|
-
}());
|
|
105
|
-
exports.ValueHistory = ValueHistory;
|
|
106
|
-
//# sourceMappingURL=valueHistory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"valueHistory.js","sourceRoot":"","sources":["../../src/tools/valueHistory.ts"],"names":[],"mappings":";;;AAAA,iCAAoD;AAGpD,+CAAwE;AAExE,IAAM,YAAY,GAAG,QAAwB,CAAA;AAUhC,QAAA,yBAAyB,GAAG,sBAAU,CAAA;AAEnD;;;GAGG;AACH;IAIE,sBACU,WAAmB,EACnB,UAAmB;QAF7B,iBAKC;QAJS,gBAAW,GAAX,WAAW,CAAQ;QACnB,eAAU,GAAV,UAAU,CAAS;QALrB,YAAO,GAAoC,EAAE,CAAA;QAOnD,IAAI,CAAC,sBAAsB,GAAG,IAAA,mBAAW,EAAC,cAAM,OAAA,KAAI,CAAC,cAAc,EAAE,EAArB,CAAqB,EAAE,iCAAyB,CAAC,CAAA;IACnG,CAAC;IAED;;;OAGG;IACH,0BAAG,GAAH,UAAI,KAAY,EAAE,SAAuB;QAAzC,iBAuBC;QAtBC,IAAM,KAAK,GAA6B;YACtC,KAAK,OAAA;YACL,SAAS,W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AAsC,EAAE,QAAwB;QAAhE,0BAAA,EAAA,wBAAsC;QAAE,yBAAA,EAAA,WAAW,CAAa;QACtE,IAAM,OAAO,GAAG,IAAA,uBAAW,EAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;QAChD,OAAO,IAAI,CAAC,OAAO;aAChB,MAAM,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,SAAS,IAAI,OAAO,IAAI,SAAS,IAAI,KAAK,CAAC,OAAO,EAAxD,CAAwD,CAAC;aAC3E,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,EAAX,CAAW,CAAC,CAAA;IAChC,CAAC;IAED;;OAEG;IACH,4BAAK,GAAL;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;IACnB,CAAC;IAED;;OAEG;IACH,2BAAI,GAAJ;QACE,IAAA,qBAAa,EAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;IAC5C,CAAC;IAEO,qCAAc,GAAtB;QACE,IAAM,gBAAgB,GAAG,IAAA,uBAAW,GAAE,GAAG,IAAI,CAAC,WAAW,CAAA;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,OAAO,GAAG,gBAAgB,EAAE;YAClG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAA;SACnB;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AAlGD,IAkGC;AAlGY,oCAAY"}
|
package/cjs/transport/batch.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Context } from '../tools/serialisation/context';
|
|
2
|
-
import type { HttpRequest } from './httpRequest';
|
|
3
|
-
import type { FlushController } from './flushController';
|
|
4
|
-
export declare class Batch {
|
|
5
|
-
private request;
|
|
6
|
-
flushController: FlushController;
|
|
7
|
-
private messageBytesLimit;
|
|
8
|
-
private pushOnlyBuffer;
|
|
9
|
-
private upsertBuffer;
|
|
10
|
-
constructor(request: HttpRequest, flushController: FlushController, messageBytesLimit: number);
|
|
11
|
-
add(message: Context): void;
|
|
12
|
-
upsert(message: Context, key: string): void;
|
|
13
|
-
private flush;
|
|
14
|
-
private addOrUpdate;
|
|
15
|
-
private process;
|
|
16
|
-
private push;
|
|
17
|
-
private remove;
|
|
18
|
-
private hasMessageFor;
|
|
19
|
-
}
|
package/cjs/transport/batch.js
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Batch = void 0;
|
|
4
|
-
var display_1 = require("../tools/display");
|
|
5
|
-
var polyfills_1 = require("../tools/utils/polyfills");
|
|
6
|
-
var pageExitObservable_1 = require("../browser/pageExitObservable");
|
|
7
|
-
var byteUtils_1 = require("../tools/utils/byteUtils");
|
|
8
|
-
var jsonStringify_1 = require("../tools/serialisation/jsonStringify");
|
|
9
|
-
var Batch = /** @class */ (function () {
|
|
10
|
-
function Batch(request, flushController, messageBytesLimit) {
|
|
11
|
-
var _this = this;
|
|
12
|
-
this.request = request;
|
|
13
|
-
this.flushController = flushController;
|
|
14
|
-
this.messageBytesLimit = messageBytesLimit;
|
|
15
|
-
this.pushOnlyBuffer = [];
|
|
16
|
-
this.upsertBuffer = {};
|
|
17
|
-
this.flushController.flushObservable.subscribe(function (event) { return _this.flush(event); });
|
|
18
|
-
}
|
|
19
|
-
Batch.prototype.add = function (message) {
|
|
20
|
-
this.addOrUpdate(message);
|
|
21
|
-
};
|
|
22
|
-
Batch.prototype.upsert = function (message, key) {
|
|
23
|
-
this.addOrUpdate(message, key);
|
|
24
|
-
};
|
|
25
|
-
Batch.prototype.flush = function (event) {
|
|
26
|
-
var messages = this.pushOnlyBuffer.concat((0, polyfills_1.objectValues)(this.upsertBuffer));
|
|
27
|
-
this.pushOnlyBuffer = [];
|
|
28
|
-
this.upsertBuffer = {};
|
|
29
|
-
var payload = { data: messages.join('\n'), bytesCount: event.bytesCount, flushReason: event.reason };
|
|
30
|
-
if ((0, pageExitObservable_1.isPageExitReason)(event.reason)) {
|
|
31
|
-
this.request.sendOnExit(payload);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
this.request.send(payload);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
Batch.prototype.addOrUpdate = function (message, key) {
|
|
38
|
-
var _a = this.process(message), processedMessage = _a.processedMessage, messageBytesCount = _a.messageBytesCount;
|
|
39
|
-
if (messageBytesCount >= this.messageBytesLimit) {
|
|
40
|
-
display_1.display.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit, "KB."));
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
if (this.hasMessageFor(key)) {
|
|
44
|
-
this.remove(key);
|
|
45
|
-
}
|
|
46
|
-
this.push(processedMessage, messageBytesCount, key);
|
|
47
|
-
};
|
|
48
|
-
Batch.prototype.process = function (message) {
|
|
49
|
-
var processedMessage = (0, jsonStringify_1.jsonStringify)(message);
|
|
50
|
-
var messageBytesCount = (0, byteUtils_1.computeBytesCount)(processedMessage);
|
|
51
|
-
return { processedMessage: processedMessage, messageBytesCount: messageBytesCount };
|
|
52
|
-
};
|
|
53
|
-
Batch.prototype.push = function (processedMessage, messageBytesCount, key) {
|
|
54
|
-
// If there are other messages, a '\n' will be added at serialization
|
|
55
|
-
var separatorBytesCount = this.flushController.messagesCount > 0 ? 1 : 0;
|
|
56
|
-
this.flushController.notifyBeforeAddMessage(messageBytesCount + separatorBytesCount);
|
|
57
|
-
if (key !== undefined) {
|
|
58
|
-
this.upsertBuffer[key] = processedMessage;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
this.pushOnlyBuffer.push(processedMessage);
|
|
62
|
-
}
|
|
63
|
-
this.flushController.notifyAfterAddMessage();
|
|
64
|
-
};
|
|
65
|
-
Batch.prototype.remove = function (key) {
|
|
66
|
-
var removedMessage = this.upsertBuffer[key];
|
|
67
|
-
delete this.upsertBuffer[key];
|
|
68
|
-
var messageBytesCount = (0, byteUtils_1.computeBytesCount)(removedMessage);
|
|
69
|
-
// If there are other messages, a '\n' will be added at serialization
|
|
70
|
-
var separatorBytesCount = this.flushController.messagesCount > 1 ? 1 : 0;
|
|
71
|
-
this.flushController.notifyAfterRemoveMessage(messageBytesCount + separatorBytesCount);
|
|
72
|
-
};
|
|
73
|
-
Batch.prototype.hasMessageFor = function (key) {
|
|
74
|
-
return key !== undefined && this.upsertBuffer[key] !== undefined;
|
|
75
|
-
};
|
|
76
|
-
return Batch;
|
|
77
|
-
}());
|
|
78
|
-
exports.Batch = Batch;
|
|
79
|
-
//# sourceMappingURL=batch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/transport/batch.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;AAE1C,sDAAuD;AACvD,oEAAgE;AAChE,sDAA4D;AAC5D,sEAAoE;AAIpE;IAIE,eACU,OAAoB,EACrB,eAAgC,EAC/B,iBAAyB;QAHnC,iBAMC;QALS,YAAO,GAAP,OAAO,CAAa;QACrB,oBAAe,GAAf,eAAe,CAAiB;QAC/B,sBAAiB,GAAjB,iBAAiB,CAAQ;QAN3B,mBAAc,GAAa,EAAE,CAAA;QAC7B,iBAAY,GAA8B,EAAE,CAAA;QAOlD,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,SAAS,CAAC,UAAC,KAAK,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAjB,CAAiB,CAAC,CAAA;IAC9E,CAAC;IAED,mBAAG,GAAH,UAAI,OAAgB;QAClB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;IAC3B,CAAC;IAED,sBAAM,GAAN,UAAO,OAAgB,EAAE,GAAW;QAClC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;IACh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ClE,CAAC;IACH,YAAC;AAAD,CAAC,AAlFD,IAkFC;AAlFY,sBAAK"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface BrowserWindowWithEventBridge extends Window {
|
|
2
|
-
DatadogEventBridge?: DatadogEventBridge;
|
|
3
|
-
}
|
|
4
|
-
export interface DatadogEventBridge {
|
|
5
|
-
getAllowedWebViewHosts(): string;
|
|
6
|
-
send(msg: string): void;
|
|
7
|
-
}
|
|
8
|
-
export declare function getEventBridge<T, E>(): {
|
|
9
|
-
getAllowedWebViewHosts(): string[];
|
|
10
|
-
send(eventType: T, event: E): void;
|
|
11
|
-
} | undefined;
|
|
12
|
-
export declare function canUseEventBridge(currentHost?: string): boolean;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.canUseEventBridge = exports.getEventBridge = void 0;
|
|
4
|
-
var polyfills_1 = require("../tools/utils/polyfills");
|
|
5
|
-
var getGlobalObject_1 = require("../tools/getGlobalObject");
|
|
6
|
-
function getEventBridge() {
|
|
7
|
-
var eventBridgeGlobal = getEventBridgeGlobal();
|
|
8
|
-
if (!eventBridgeGlobal) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
getAllowedWebViewHosts: function () {
|
|
13
|
-
return JSON.parse(eventBridgeGlobal.getAllowedWebViewHosts());
|
|
14
|
-
},
|
|
15
|
-
send: function (eventType, event) {
|
|
16
|
-
eventBridgeGlobal.send(JSON.stringify({ eventType: eventType, event: event }));
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
exports.getEventBridge = getEventBridge;
|
|
21
|
-
function canUseEventBridge(currentHost) {
|
|
22
|
-
var _a;
|
|
23
|
-
if (currentHost === void 0) { currentHost = (_a = (0, getGlobalObject_1.getGlobalObject)().location) === null || _a === void 0 ? void 0 : _a.hostname; }
|
|
24
|
-
var bridge = getEventBridge();
|
|
25
|
-
return (!!bridge &&
|
|
26
|
-
bridge
|
|
27
|
-
.getAllowedWebViewHosts()
|
|
28
|
-
.some(function (allowedHost) { return currentHost === allowedHost || (0, polyfills_1.endsWith)(currentHost, ".".concat(allowedHost)); }));
|
|
29
|
-
}
|
|
30
|
-
exports.canUseEventBridge = canUseEventBridge;
|
|
31
|
-
function getEventBridgeGlobal() {
|
|
32
|
-
return (0, getGlobalObject_1.getGlobalObject)().DatadogEventBridge;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=eventBridge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventBridge.js","sourceRoot":"","sources":["../../src/transport/eventBridge.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AACnD,4DAA0D;AAW1D,SAAgB,cAAc;IAC5B,IAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAA;IAEhD,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAM;KACP;IAED,OAAO;QACL,sBAAsB;YACpB,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,CAAa,CAAA;QAC3E,CAAC;QACD,IAAI,YAAC,SAAY,EAAE,KAAQ;YACzB,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS,WAAA,EAAE,KAAK,OAAA,EAAE,CAAC,CAAC,CAAA;QAC9D,CAAC;KACF,CAAA;AACH,CAAC;AAfD,wCAeC;AAED,SAAgB,iBAAiB,CAAC,WAA0D;;IAA1D,4BAAA,EAAA,oBAAc,IAAA,iCAAe,GAAU,CAAC,QAAQ,0CAAE,QAAQ;IAC1F,IAAM,MAAM,GAAG,cAAc,EAAE,CAAA;IAC/B,OAAO,CACL,CAAC,CAAC,MAAM;QACR,MAAM;aACH,sBAAsB,EAAE;aACxB,IAAI,CAAC,UAAC,WAAW,IAAK,OAAA,WAAW,KAAK,WAAW,IAAI,IAAA,oBAAQ,EAAC,WAAW,EAAE,WAAI,WAAW,CAAE,CAAC,EAAvE,CAAuE,CAAC,CAClG,CAAA;AACH,CAAC;AARD,8CAQC;AAED,SAAS,oBAAoB;IAC3B,OAAO,IAAA,iCAAe,GAAgC,CAAC,kBAAkB,CAAA;AAC3E,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import type { PageExitEvent, PageExitReason } from '../browser/pageExitObservable';
|
|
2
|
-
import { Observable } from '../tools/observable';
|
|
3
|
-
import type { Duration } from '../tools/utils/timeUtils';
|
|
4
|
-
export type FlushReason = PageExitReason | 'duration_limit' | 'bytes_limit' | 'messages_limit' | 'session_expire';
|
|
5
|
-
export type FlushController = ReturnType<typeof createFlushController>;
|
|
6
|
-
export interface FlushEvent {
|
|
7
|
-
reason: FlushReason;
|
|
8
|
-
bytesCount: number;
|
|
9
|
-
messagesCount: number;
|
|
10
|
-
}
|
|
11
|
-
interface FlushControllerOptions {
|
|
12
|
-
messagesLimit: number;
|
|
13
|
-
bytesLimit: number;
|
|
14
|
-
durationLimit: Duration;
|
|
15
|
-
pageExitObservable: Observable<PageExitEvent>;
|
|
16
|
-
sessionExpireObservable: Observable<void>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Returns a "flush controller", responsible of notifying when flushing a pool of pending data needs
|
|
20
|
-
* to happen. The implementation is designed to support both synchronous and asynchronous usages,
|
|
21
|
-
* but relies on invariants described in each method documentation to keep a coherent state.
|
|
22
|
-
*/
|
|
23
|
-
export declare function createFlushController({ messagesLimit, bytesLimit, durationLimit, pageExitObservable, sessionExpireObservable, }: FlushControllerOptions): {
|
|
24
|
-
flushObservable: Observable<FlushEvent>;
|
|
25
|
-
readonly messagesCount: number;
|
|
26
|
-
/**
|
|
27
|
-
* Notifies that a message will be added to a pool of pending messages waiting to be flushed.
|
|
28
|
-
*
|
|
29
|
-
* This function needs to be called synchronously, right before adding the message, so no flush
|
|
30
|
-
* event can happen after `notifyBeforeAddMessage` and before adding the message.
|
|
31
|
-
*/
|
|
32
|
-
notifyBeforeAddMessage(messageBytesCount: number): void;
|
|
33
|
-
/**
|
|
34
|
-
* Notifies that a message *was* added to a pool of pending messages waiting to be flushed.
|
|
35
|
-
*
|
|
36
|
-
* This function can be called asynchronously after the message was added, but in this case it
|
|
37
|
-
* should not be called if a flush event occurred in between.
|
|
38
|
-
*/
|
|
39
|
-
notifyAfterAddMessage(): void;
|
|
40
|
-
/**
|
|
41
|
-
* Notifies that a message was removed from a pool of pending messages waiting to be flushed.
|
|
42
|
-
*
|
|
43
|
-
* This function needs to be called synchronously, right after removing the message, so no flush
|
|
44
|
-
* event can happen after removing the message and before `notifyAfterRemoveMessage`.
|
|
45
|
-
*/
|
|
46
|
-
notifyAfterRemoveMessage(messageBytesCount: number): void;
|
|
47
|
-
};
|
|
48
|
-
export {};
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFlushController = void 0;
|
|
4
|
-
var observable_1 = require("../tools/observable");
|
|
5
|
-
var timer_1 = require("../tools/timer");
|
|
6
|
-
/**
|
|
7
|
-
* Returns a "flush controller", responsible of notifying when flushing a pool of pending data needs
|
|
8
|
-
* to happen. The implementation is designed to support both synchronous and asynchronous usages,
|
|
9
|
-
* but relies on invariants described in each method documentation to keep a coherent state.
|
|
10
|
-
*/
|
|
11
|
-
function createFlushController(_a) {
|
|
12
|
-
var messagesLimit = _a.messagesLimit, bytesLimit = _a.bytesLimit, durationLimit = _a.durationLimit, pageExitObservable = _a.pageExitObservable, sessionExpireObservable = _a.sessionExpireObservable;
|
|
13
|
-
var flushObservable = new observable_1.Observable();
|
|
14
|
-
pageExitObservable.subscribe(function (event) { return flush(event.reason); });
|
|
15
|
-
sessionExpireObservable.subscribe(function () { return flush('session_expire'); });
|
|
16
|
-
var currentBytesCount = 0;
|
|
17
|
-
var currentMessagesCount = 0;
|
|
18
|
-
function flush(flushReason) {
|
|
19
|
-
if (currentMessagesCount === 0) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
var messagesCount = currentMessagesCount;
|
|
23
|
-
var bytesCount = currentBytesCount;
|
|
24
|
-
currentMessagesCount = 0;
|
|
25
|
-
currentBytesCount = 0;
|
|
26
|
-
cancelDurationLimitTimeout();
|
|
27
|
-
flushObservable.notify({
|
|
28
|
-
reason: flushReason,
|
|
29
|
-
messagesCount: messagesCount,
|
|
30
|
-
bytesCount: bytesCount,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
var durationLimitTimeoutId;
|
|
34
|
-
function scheduleDurationLimitTimeout() {
|
|
35
|
-
if (durationLimitTimeoutId === undefined) {
|
|
36
|
-
durationLimitTimeoutId = (0, timer_1.setTimeout)(function () {
|
|
37
|
-
flush('duration_limit');
|
|
38
|
-
}, durationLimit);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function cancelDurationLimitTimeout() {
|
|
42
|
-
(0, timer_1.clearTimeout)(durationLimitTimeoutId);
|
|
43
|
-
durationLimitTimeoutId = undefined;
|
|
44
|
-
}
|
|
45
|
-
return {
|
|
46
|
-
flushObservable: flushObservable,
|
|
47
|
-
get messagesCount() {
|
|
48
|
-
return currentMessagesCount;
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* Notifies that a message will be added to a pool of pending messages waiting to be flushed.
|
|
52
|
-
*
|
|
53
|
-
* This function needs to be called synchronously, right before adding the message, so no flush
|
|
54
|
-
* event can happen after `notifyBeforeAddMessage` and before adding the message.
|
|
55
|
-
*/
|
|
56
|
-
notifyBeforeAddMessage: function (messageBytesCount) {
|
|
57
|
-
if (currentBytesCount + messageBytesCount >= bytesLimit) {
|
|
58
|
-
flush('bytes_limit');
|
|
59
|
-
}
|
|
60
|
-
// Consider the message to be added now rather than in `notifyAfterAddMessage`, because if no
|
|
61
|
-
// message was added yet and `notifyAfterAddMessage` is called asynchronously, we still want
|
|
62
|
-
// to notify when a flush is needed (for example on page exit).
|
|
63
|
-
currentMessagesCount += 1;
|
|
64
|
-
currentBytesCount += messageBytesCount;
|
|
65
|
-
scheduleDurationLimitTimeout();
|
|
66
|
-
},
|
|
67
|
-
/**
|
|
68
|
-
* Notifies that a message *was* added to a pool of pending messages waiting to be flushed.
|
|
69
|
-
*
|
|
70
|
-
* This function can be called asynchronously after the message was added, but in this case it
|
|
71
|
-
* should not be called if a flush event occurred in between.
|
|
72
|
-
*/
|
|
73
|
-
notifyAfterAddMessage: function () {
|
|
74
|
-
if (currentMessagesCount >= messagesLimit) {
|
|
75
|
-
flush('messages_limit');
|
|
76
|
-
}
|
|
77
|
-
else if (currentBytesCount >= bytesLimit) {
|
|
78
|
-
flush('bytes_limit');
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
/**
|
|
82
|
-
* Notifies that a message was removed from a pool of pending messages waiting to be flushed.
|
|
83
|
-
*
|
|
84
|
-
* This function needs to be called synchronously, right after removing the message, so no flush
|
|
85
|
-
* event can happen after removing the message and before `notifyAfterRemoveMessage`.
|
|
86
|
-
*/
|
|
87
|
-
notifyAfterRemoveMessage: function (messageBytesCount) {
|
|
88
|
-
currentBytesCount -= messageBytesCount;
|
|
89
|
-
currentMessagesCount -= 1;
|
|
90
|
-
if (currentMessagesCount === 0) {
|
|
91
|
-
cancelDurationLimitTimeout();
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
exports.createFlushController = createFlushController;
|
|
97
|
-
//# sourceMappingURL=flushController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flushController.js","sourceRoot":"","sources":["../../src/transport/flushController.ts"],"names":[],"mappings":";;;AACA,kDAAgD;AAEhD,wCAAyD;AAoBzD;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,EAMb;QALvB,aAAa,mBAAA,EACb,UAAU,gBAAA,EACV,aAAa,mBAAA,EACb,kBAAkB,wBAAA,EAClB,uBAAuB,6BAAA;IAEvB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D,KAAK,CAAC,aAAa,CAAC,CAAA;aACrB;YACD,6FAA6F;YAC7F,4FAA4F;YAC5F,+DAA+D;YAC/D,oBAAoB,IAAI,CAAC,CAAA;YACzB,iBAAiB,IAAI,iBAAiB,CAAA;YACtC,4BAA4B,EAAE,CAAA;QAChC,CAAC;QAED;;;;;WAKG;QACH,qBAAqB;YACnB,IAAI,oBAAoB,IAAI,aAAa,EAAE;gBACzC,KAAK,CAAC,gBAAgB,CAAC,CAAA;aACxB;iBAAM,IAAI,iBAAiB,IAAI,UAAU,EAAE;gBAC1C,KAAK,CAAC,aAAa,CAAC,CAAA;aACrB;QACH,CAAC;QAED;;;;;WAKG;QACH,wBAAwB,YAAC,iBAAyB;YAChD,iBAAiB,IAAI,iBAAiB,CAAA;YACtC,oBAAoB,IAAI,CAAC,CAAA;YACzB,IAAI,oBAAoB,KAAK,CAAC,EAAE;gBAC9B,0BAA0B,EAAE,CAAA;aAC7B;QACH,CAAC;KACF,CAAA;AACH,CAAC;AApGD,sDAoGC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import type { EndpointBuilder, Configuration } from '../domain/configuration';
|
|
2
|
-
import type { Context } from '../tools/serialisation/context';
|
|
3
|
-
import type { RawError } from '../domain/error/error.types';
|
|
4
|
-
import type { FlushReason } from './flushController';
|
|
5
|
-
/**
|
|
6
|
-
* Use POST request without content type to:
|
|
7
|
-
* - avoid CORS preflight requests
|
|
8
|
-
* - allow usage of sendBeacon
|
|
9
|
-
*
|
|
10
|
-
* multiple elements are sent separated by \n in order
|
|
11
|
-
* to be parsed correctly without content type header
|
|
12
|
-
*/
|
|
13
|
-
export type HttpRequest = ReturnType<typeof createHttpRequest>;
|
|
14
|
-
export interface HttpResponse extends Context {
|
|
15
|
-
status: number;
|
|
16
|
-
type?: ResponseType;
|
|
17
|
-
}
|
|
18
|
-
export interface Payload {
|
|
19
|
-
data: string | FormData;
|
|
20
|
-
bytesCount: number;
|
|
21
|
-
retry?: RetryInfo;
|
|
22
|
-
flushReason?: FlushReason;
|
|
23
|
-
}
|
|
24
|
-
export interface RetryInfo {
|
|
25
|
-
count: number;
|
|
26
|
-
lastFailureStatus: number;
|
|
27
|
-
}
|
|
28
|
-
export declare function createHttpRequest(configuration: Configuration, endpointBuilder: EndpointBuilder, bytesLimit: number, reportError: (error: RawError) => void): {
|
|
29
|
-
send: (payload: Payload) => void;
|
|
30
|
-
/**
|
|
31
|
-
* Since fetch keepalive behaves like regular fetch on Firefox,
|
|
32
|
-
* keep using sendBeaconStrategy on exit
|
|
33
|
-
*/
|
|
34
|
-
sendOnExit: (payload: Payload) => void;
|
|
35
|
-
};
|
|
36
|
-
export declare function fetchKeepAliveStrategy(configuration: Configuration, endpointBuilder: EndpointBuilder, bytesLimit: number, { data, bytesCount, flushReason, retry }: Payload, onResponse?: (r: HttpResponse) => void): void;
|
|
37
|
-
export declare function sendXHR(configuration: Configuration, url: string, data: Payload['data'], onResponse?: (r: HttpResponse) => void): void;
|