@openobserve/browser-core 0.2.8
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/LICENSE +201 -0
- package/README.md +3 -0
- package/cjs/boot/init.d.ts +5 -0
- package/cjs/boot/init.js +36 -0
- package/cjs/boot/init.js.map +1 -0
- package/cjs/browser/addEventListener.d.ts +76 -0
- package/cjs/browser/addEventListener.js +52 -0
- package/cjs/browser/addEventListener.js.map +1 -0
- package/cjs/browser/cookie.d.ts +10 -0
- package/cjs/browser/cookie.js +69 -0
- package/cjs/browser/cookie.js.map +1 -0
- package/cjs/browser/fetchObservable.d.ts +23 -0
- package/cjs/browser/fetchObservable.js +74 -0
- package/cjs/browser/fetchObservable.js.map +1 -0
- package/cjs/browser/pageExitObservable.d.ts +14 -0
- package/cjs/browser/pageExitObservable.js +58 -0
- package/cjs/browser/pageExitObservable.js.map +1 -0
- package/cjs/browser/runOnReadyState.d.ts +2 -0
- package/cjs/browser/runOnReadyState.js +15 -0
- package/cjs/browser/runOnReadyState.js.map +1 -0
- package/cjs/browser/types.d.ts +19 -0
- package/cjs/browser/types.js +6 -0
- package/cjs/browser/types.js.map +1 -0
- package/cjs/browser/xhrObservable.d.ts +22 -0
- package/cjs/browser/xhrObservable.js +93 -0
- package/cjs/browser/xhrObservable.js.map +1 -0
- package/cjs/domain/configuration/configuration.d.ts +67 -0
- package/cjs/domain/configuration/configuration.js +95 -0
- package/cjs/domain/configuration/configuration.js.map +1 -0
- package/cjs/domain/configuration/endpointBuilder.d.ts +14 -0
- package/cjs/domain/configuration/endpointBuilder.js +94 -0
- package/cjs/domain/configuration/endpointBuilder.js.map +1 -0
- package/cjs/domain/configuration/index.d.ts +3 -0
- package/cjs/domain/configuration/index.js +25 -0
- package/cjs/domain/configuration/index.js.map +1 -0
- package/cjs/domain/configuration/intakeSites.d.ts +5 -0
- package/cjs/domain/configuration/intakeSites.js +9 -0
- package/cjs/domain/configuration/intakeSites.js.map +1 -0
- package/cjs/domain/configuration/tags.d.ts +4 -0
- package/cjs/domain/configuration/tags.js +39 -0
- package/cjs/domain/configuration/tags.js.map +1 -0
- package/cjs/domain/configuration/transportConfiguration.d.ts +16 -0
- package/cjs/domain/configuration/transportConfiguration.js +42 -0
- package/cjs/domain/configuration/transportConfiguration.js.map +1 -0
- package/cjs/domain/console/consoleObservable.d.ts +11 -0
- package/cjs/domain/console/consoleObservable.js +75 -0
- package/cjs/domain/console/consoleObservable.js.map +1 -0
- package/cjs/domain/deflate/index.d.ts +1 -0
- package/cjs/domain/deflate/index.js +18 -0
- package/cjs/domain/deflate/index.js.map +1 -0
- package/cjs/domain/deflate/types.d.ts +26 -0
- package/cjs/domain/deflate/types.js +3 -0
- package/cjs/domain/deflate/types.js.map +1 -0
- package/cjs/domain/error/error.d.ts +28 -0
- package/cjs/domain/error/error.js +131 -0
- package/cjs/domain/error/error.js.map +1 -0
- package/cjs/domain/error/error.types.d.ts +40 -0
- package/cjs/domain/error/error.types.js +13 -0
- package/cjs/domain/error/error.types.js.map +1 -0
- package/cjs/domain/error/trackRuntimeError.d.ts +5 -0
- package/cjs/domain/error/trackRuntimeError.js +21 -0
- package/cjs/domain/error/trackRuntimeError.js.map +1 -0
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.d.ts +5 -0
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.js +40 -0
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.js.map +1 -0
- package/cjs/domain/report/browser.types.d.ts +24 -0
- package/cjs/domain/report/browser.types.js +3 -0
- package/cjs/domain/report/browser.types.js.map +1 -0
- package/cjs/domain/report/reportObservable.d.ts +15 -0
- package/cjs/domain/report/reportObservable.js +94 -0
- package/cjs/domain/report/reportObservable.js.map +1 -0
- package/cjs/domain/resourceUtils.d.ts +16 -0
- package/cjs/domain/resourceUtils.js +3 -0
- package/cjs/domain/resourceUtils.js.map +1 -0
- package/cjs/domain/session/oldCookiesMigration.d.ts +11 -0
- package/cjs/domain/session/oldCookiesMigration.js +40 -0
- package/cjs/domain/session/oldCookiesMigration.js.map +1 -0
- package/cjs/domain/session/sessionConstants.d.ts +2 -0
- package/cjs/domain/session/sessionConstants.js +7 -0
- package/cjs/domain/session/sessionConstants.js.map +1 -0
- package/cjs/domain/session/sessionManager.d.ts +20 -0
- package/cjs/domain/session/sessionManager.js +65 -0
- package/cjs/domain/session/sessionManager.js.map +1 -0
- package/cjs/domain/session/sessionState.d.ts +11 -0
- package/cjs/domain/session/sessionState.js +45 -0
- package/cjs/domain/session/sessionState.js.map +1 -0
- package/cjs/domain/session/sessionStore.d.ts +34 -0
- package/cjs/domain/session/sessionStore.js +144 -0
- package/cjs/domain/session/sessionStore.js.map +1 -0
- package/cjs/domain/session/sessionStoreOperations.d.ts +15 -0
- package/cjs/domain/session/sessionStoreOperations.js +104 -0
- package/cjs/domain/session/sessionStoreOperations.js.map +1 -0
- package/cjs/domain/session/storeStrategies/sessionInCookie.d.ts +6 -0
- package/cjs/domain/session/storeStrategies/sessionInCookie.js +48 -0
- package/cjs/domain/session/storeStrategies/sessionInCookie.js.map +1 -0
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.d.ts +3 -0
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js +40 -0
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js.map +1 -0
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.d.ts +14 -0
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.js +5 -0
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.js.map +1 -0
- package/cjs/domain/synthetics/syntheticsWorkerValues.d.ts +11 -0
- package/cjs/domain/synthetics/syntheticsWorkerValues.js +22 -0
- package/cjs/domain/synthetics/syntheticsWorkerValues.js.map +1 -0
- package/cjs/domain/telemetry/index.d.ts +3 -0
- package/cjs/domain/telemetry/index.js +28 -0
- package/cjs/domain/telemetry/index.js.map +1 -0
- package/cjs/domain/telemetry/rawTelemetryEvent.types.d.ts +11 -0
- package/cjs/domain/telemetry/rawTelemetryEvent.types.js +8 -0
- package/cjs/domain/telemetry/rawTelemetryEvent.types.js.map +1 -0
- package/cjs/domain/telemetry/telemetry.d.ts +112 -0
- package/cjs/domain/telemetry/telemetry.js +146 -0
- package/cjs/domain/telemetry/telemetry.js.map +1 -0
- package/cjs/domain/telemetry/telemetryEvent.types.d.ts +375 -0
- package/cjs/domain/telemetry/telemetryEvent.types.js +7 -0
- package/cjs/domain/telemetry/telemetryEvent.types.js.map +1 -0
- package/cjs/domain/tracekit/computeStackTrace.d.ts +5 -0
- package/cjs/domain/tracekit/computeStackTrace.js +118 -0
- package/cjs/domain/tracekit/computeStackTrace.js.map +1 -0
- package/cjs/domain/tracekit/index.d.ts +3 -0
- package/cjs/domain/tracekit/index.js +8 -0
- package/cjs/domain/tracekit/index.js.map +1 -0
- package/cjs/domain/tracekit/tracekit.d.ts +35 -0
- package/cjs/domain/tracekit/tracekit.js +95 -0
- package/cjs/domain/tracekit/tracekit.js.map +1 -0
- package/cjs/domain/tracekit/types.d.ts +44 -0
- package/cjs/domain/tracekit/types.js +3 -0
- package/cjs/domain/tracekit/types.js.map +1 -0
- package/cjs/domain/user/index.d.ts +2 -0
- package/cjs/domain/user/index.js +19 -0
- package/cjs/domain/user/index.js.map +1 -0
- package/cjs/domain/user/user.d.ts +12 -0
- package/cjs/domain/user/user.js +35 -0
- package/cjs/domain/user/user.js.map +1 -0
- package/cjs/domain/user/user.types.d.ts +6 -0
- package/cjs/domain/user/user.types.js +3 -0
- package/cjs/domain/user/user.types.js.map +1 -0
- package/cjs/index.d.ts +63 -0
- package/cjs/index.js +155 -0
- package/cjs/index.js.map +1 -0
- package/cjs/tools/abstractLifeCycle.d.ts +23 -0
- package/cjs/tools/abstractLifeCycle.js +29 -0
- package/cjs/tools/abstractLifeCycle.js.map +1 -0
- package/cjs/tools/boundedBuffer.d.ts +5 -0
- package/cjs/tools/boundedBuffer.js +22 -0
- package/cjs/tools/boundedBuffer.js.map +1 -0
- package/cjs/tools/catchUserErrors.d.ts +1 -0
- package/cjs/tools/catchUserErrors.js +20 -0
- package/cjs/tools/catchUserErrors.js.map +1 -0
- package/cjs/tools/display.d.ts +35 -0
- package/cjs/tools/display.js +45 -0
- package/cjs/tools/display.js.map +1 -0
- package/cjs/tools/experimentalFeatures.d.ts +24 -0
- package/cjs/tools/experimentalFeatures.js +47 -0
- package/cjs/tools/experimentalFeatures.js.map +1 -0
- package/cjs/tools/getGlobalObject.d.ts +4 -0
- package/cjs/tools/getGlobalObject.js +37 -0
- package/cjs/tools/getGlobalObject.js.map +1 -0
- package/cjs/tools/getZoneJsOriginalValue.d.ts +19 -0
- package/cjs/tools/getZoneJsOriginalValue.js +30 -0
- package/cjs/tools/getZoneJsOriginalValue.js.map +1 -0
- package/cjs/tools/instrumentMethod.d.ts +19 -0
- package/cjs/tools/instrumentMethod.js +83 -0
- package/cjs/tools/instrumentMethod.js.map +1 -0
- package/cjs/tools/matchOption.d.ts +8 -0
- package/cjs/tools/matchOption.js +38 -0
- package/cjs/tools/matchOption.js.map +1 -0
- package/cjs/tools/mergeInto.d.ts +25 -0
- package/cjs/tools/mergeInto.js +105 -0
- package/cjs/tools/mergeInto.js.map +1 -0
- package/cjs/tools/monitor.d.ts +9 -0
- package/cjs/tools/monitor.js +76 -0
- package/cjs/tools/monitor.js.map +1 -0
- package/cjs/tools/observable.d.ts +12 -0
- package/cjs/tools/observable.js +44 -0
- package/cjs/tools/observable.js.map +1 -0
- package/cjs/tools/readBytesFromStream.d.ts +11 -0
- package/cjs/tools/readBytesFromStream.js +64 -0
- package/cjs/tools/readBytesFromStream.js.map +1 -0
- package/cjs/tools/sendToExtension.d.ts +3 -0
- package/cjs/tools/sendToExtension.js +11 -0
- package/cjs/tools/sendToExtension.js.map +1 -0
- package/cjs/tools/serialisation/context.d.ts +6 -0
- package/cjs/tools/serialisation/context.js +3 -0
- package/cjs/tools/serialisation/context.js.map +1 -0
- package/cjs/tools/serialisation/contextManager.d.ts +21 -0
- package/cjs/tools/serialisation/contextManager.js +70 -0
- package/cjs/tools/serialisation/contextManager.js.map +1 -0
- package/cjs/tools/serialisation/heavyCustomerDataWarning.d.ts +8 -0
- package/cjs/tools/serialisation/heavyCustomerDataWarning.js +18 -0
- package/cjs/tools/serialisation/heavyCustomerDataWarning.js.map +1 -0
- package/cjs/tools/serialisation/jsonStringify.d.ts +14 -0
- package/cjs/tools/serialisation/jsonStringify.js +49 -0
- package/cjs/tools/serialisation/jsonStringify.js.map +1 -0
- package/cjs/tools/serialisation/sanitize.d.ts +18 -0
- package/cjs/tools/serialisation/sanitize.js +185 -0
- package/cjs/tools/serialisation/sanitize.js.map +1 -0
- package/cjs/tools/timer.d.ts +5 -0
- package/cjs/tools/timer.js +23 -0
- package/cjs/tools/timer.js.map +1 -0
- package/cjs/tools/utils/arrayUtils.d.ts +1 -0
- package/cjs/tools/utils/arrayUtils.js +11 -0
- package/cjs/tools/utils/arrayUtils.js.map +1 -0
- package/cjs/tools/utils/browserDetection.d.ts +2 -0
- package/cjs/tools/utils/browserDetection.js +12 -0
- package/cjs/tools/utils/browserDetection.js.map +1 -0
- package/cjs/tools/utils/byteUtils.d.ts +4 -0
- package/cjs/tools/utils/byteUtils.js +31 -0
- package/cjs/tools/utils/byteUtils.js.map +1 -0
- package/cjs/tools/utils/functionUtils.d.ts +9 -0
- package/cjs/tools/utils/functionUtils.js +48 -0
- package/cjs/tools/utils/functionUtils.js.map +1 -0
- package/cjs/tools/utils/numberUtils.d.ts +8 -0
- package/cjs/tools/utils/numberUtils.js +24 -0
- package/cjs/tools/utils/numberUtils.js.map +1 -0
- package/cjs/tools/utils/objectUtils.d.ts +10 -0
- package/cjs/tools/utils/objectUtils.js +26 -0
- package/cjs/tools/utils/objectUtils.js.map +1 -0
- package/cjs/tools/utils/polyfills.d.ts +24 -0
- package/cjs/tools/utils/polyfills.js +110 -0
- package/cjs/tools/utils/polyfills.js.map +1 -0
- package/cjs/tools/utils/responseUtils.d.ts +2 -0
- package/cjs/tools/utils/responseUtils.js +18 -0
- package/cjs/tools/utils/responseUtils.js.map +1 -0
- package/cjs/tools/utils/stringUtils.d.ts +7 -0
- package/cjs/tools/utils/stringUtils.js +32 -0
- package/cjs/tools/utils/stringUtils.js.map +1 -0
- package/cjs/tools/utils/timeUtils.d.ts +57 -0
- package/cjs/tools/utils/timeUtils.js +99 -0
- package/cjs/tools/utils/timeUtils.js.map +1 -0
- package/cjs/tools/utils/typeUtils.d.ts +4 -0
- package/cjs/tools/utils/typeUtils.js +17 -0
- package/cjs/tools/utils/typeUtils.js.map +1 -0
- package/cjs/tools/utils/urlPolyfill.d.ts +14 -0
- package/cjs/tools/utils/urlPolyfill.js +92 -0
- package/cjs/tools/utils/urlPolyfill.js.map +1 -0
- package/cjs/tools/valueHistory.d.ts +50 -0
- package/cjs/tools/valueHistory.js +106 -0
- package/cjs/tools/valueHistory.js.map +1 -0
- package/cjs/transport/batch.d.ts +19 -0
- package/cjs/transport/batch.js +79 -0
- package/cjs/transport/batch.js.map +1 -0
- package/cjs/transport/eventBridge.d.ts +12 -0
- package/cjs/transport/eventBridge.js +34 -0
- package/cjs/transport/eventBridge.js.map +1 -0
- package/cjs/transport/flushController.d.ts +48 -0
- package/cjs/transport/flushController.js +97 -0
- package/cjs/transport/flushController.js.map +1 -0
- package/cjs/transport/httpRequest.d.ts +37 -0
- package/cjs/transport/httpRequest.js +91 -0
- package/cjs/transport/httpRequest.js.map +1 -0
- package/cjs/transport/index.d.ts +4 -0
- package/cjs/transport/index.js +13 -0
- package/cjs/transport/index.js.map +1 -0
- package/cjs/transport/sendWithRetryStrategy.d.ts +39 -0
- package/cjs/transport/sendWithRetryStrategy.js +151 -0
- package/cjs/transport/sendWithRetryStrategy.js.map +1 -0
- package/cjs/transport/startBatchWithReplica.d.ts +15 -0
- package/cjs/transport/startBatchWithReplica.js +37 -0
- package/cjs/transport/startBatchWithReplica.js.map +1 -0
- package/esm/boot/init.d.ts +5 -0
- package/esm/boot/init.js +31 -0
- package/esm/boot/init.js.map +1 -0
- package/esm/browser/addEventListener.d.ts +76 -0
- package/esm/browser/addEventListener.js +47 -0
- package/esm/browser/addEventListener.js.map +1 -0
- package/esm/browser/cookie.d.ts +10 -0
- package/esm/browser/cookie.js +61 -0
- package/esm/browser/cookie.js.map +1 -0
- package/esm/browser/fetchObservable.d.ts +23 -0
- package/esm/browser/fetchObservable.js +70 -0
- package/esm/browser/fetchObservable.js.map +1 -0
- package/esm/browser/pageExitObservable.d.ts +14 -0
- package/esm/browser/pageExitObservable.js +53 -0
- package/esm/browser/pageExitObservable.js.map +1 -0
- package/esm/browser/runOnReadyState.d.ts +2 -0
- package/esm/browser/runOnReadyState.js +11 -0
- package/esm/browser/runOnReadyState.js.map +1 -0
- package/esm/browser/types.d.ts +19 -0
- package/esm/browser/types.js +5 -0
- package/esm/browser/types.js.map +1 -0
- package/esm/browser/xhrObservable.d.ts +22 -0
- package/esm/browser/xhrObservable.js +89 -0
- package/esm/browser/xhrObservable.js.map +1 -0
- package/esm/domain/configuration/configuration.d.ts +67 -0
- package/esm/domain/configuration/configuration.js +90 -0
- package/esm/domain/configuration/configuration.js.map +1 -0
- package/esm/domain/configuration/endpointBuilder.d.ts +14 -0
- package/esm/domain/configuration/endpointBuilder.js +90 -0
- package/esm/domain/configuration/endpointBuilder.js.map +1 -0
- package/esm/domain/configuration/index.d.ts +3 -0
- package/esm/domain/configuration/index.js +4 -0
- package/esm/domain/configuration/index.js.map +1 -0
- package/esm/domain/configuration/intakeSites.d.ts +5 -0
- package/esm/domain/configuration/intakeSites.js +6 -0
- package/esm/domain/configuration/intakeSites.js.map +1 -0
- package/esm/domain/configuration/tags.d.ts +4 -0
- package/esm/domain/configuration/tags.js +34 -0
- package/esm/domain/configuration/tags.js.map +1 -0
- package/esm/domain/configuration/transportConfiguration.d.ts +16 -0
- package/esm/domain/configuration/transportConfiguration.js +38 -0
- package/esm/domain/configuration/transportConfiguration.js.map +1 -0
- package/esm/domain/console/consoleObservable.d.ts +11 -0
- package/esm/domain/console/consoleObservable.js +70 -0
- package/esm/domain/console/consoleObservable.js.map +1 -0
- package/esm/domain/deflate/index.d.ts +1 -0
- package/esm/domain/deflate/index.js +2 -0
- package/esm/domain/deflate/index.js.map +1 -0
- package/esm/domain/deflate/types.d.ts +26 -0
- package/esm/domain/deflate/types.js +2 -0
- package/esm/domain/deflate/types.js.map +1 -0
- package/esm/domain/error/error.d.ts +28 -0
- package/esm/domain/error/error.js +121 -0
- package/esm/domain/error/error.js.map +1 -0
- package/esm/domain/error/error.types.d.ts +40 -0
- package/esm/domain/error/error.types.js +10 -0
- package/esm/domain/error/error.types.js.map +1 -0
- package/esm/domain/error/trackRuntimeError.d.ts +5 -0
- package/esm/domain/error/trackRuntimeError.js +17 -0
- package/esm/domain/error/trackRuntimeError.js.map +1 -0
- package/esm/domain/eventRateLimiter/createEventRateLimiter.d.ts +5 -0
- package/esm/domain/eventRateLimiter/createEventRateLimiter.js +36 -0
- package/esm/domain/eventRateLimiter/createEventRateLimiter.js.map +1 -0
- package/esm/domain/report/browser.types.d.ts +24 -0
- package/esm/domain/report/browser.types.js +2 -0
- package/esm/domain/report/browser.types.js.map +1 -0
- package/esm/domain/report/reportObservable.d.ts +15 -0
- package/esm/domain/report/reportObservable.js +90 -0
- package/esm/domain/report/reportObservable.js.map +1 -0
- package/esm/domain/resourceUtils.d.ts +16 -0
- package/esm/domain/resourceUtils.js +2 -0
- package/esm/domain/resourceUtils.js.map +1 -0
- package/esm/domain/session/oldCookiesMigration.d.ts +11 -0
- package/esm/domain/session/oldCookiesMigration.js +36 -0
- package/esm/domain/session/oldCookiesMigration.js.map +1 -0
- package/esm/domain/session/sessionConstants.d.ts +2 -0
- package/esm/domain/session/sessionConstants.js +4 -0
- package/esm/domain/session/sessionConstants.js.map +1 -0
- package/esm/domain/session/sessionManager.d.ts +20 -0
- package/esm/domain/session/sessionManager.js +60 -0
- package/esm/domain/session/sessionManager.js.map +1 -0
- package/esm/domain/session/sessionState.d.ts +11 -0
- package/esm/domain/session/sessionState.js +38 -0
- package/esm/domain/session/sessionState.js.map +1 -0
- package/esm/domain/session/sessionStore.d.ts +34 -0
- package/esm/domain/session/sessionStore.js +139 -0
- package/esm/domain/session/sessionStore.js.map +1 -0
- package/esm/domain/session/sessionStoreOperations.d.ts +15 -0
- package/esm/domain/session/sessionStoreOperations.js +99 -0
- package/esm/domain/session/sessionStoreOperations.js.map +1 -0
- package/esm/domain/session/storeStrategies/sessionInCookie.d.ts +6 -0
- package/esm/domain/session/storeStrategies/sessionInCookie.js +42 -0
- package/esm/domain/session/storeStrategies/sessionInCookie.js.map +1 -0
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.d.ts +3 -0
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js +35 -0
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js.map +1 -0
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.d.ts +14 -0
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.js +2 -0
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.js.map +1 -0
- package/esm/domain/synthetics/syntheticsWorkerValues.d.ts +11 -0
- package/esm/domain/synthetics/syntheticsWorkerValues.js +16 -0
- package/esm/domain/synthetics/syntheticsWorkerValues.js.map +1 -0
- package/esm/domain/telemetry/index.d.ts +3 -0
- package/esm/domain/telemetry/index.js +4 -0
- package/esm/domain/telemetry/index.js.map +1 -0
- package/esm/domain/telemetry/rawTelemetryEvent.types.d.ts +11 -0
- package/esm/domain/telemetry/rawTelemetryEvent.types.js +5 -0
- package/esm/domain/telemetry/rawTelemetryEvent.types.js.map +1 -0
- package/esm/domain/telemetry/telemetry.d.ts +112 -0
- package/esm/domain/telemetry/telemetry.js +134 -0
- package/esm/domain/telemetry/telemetry.js.map +1 -0
- package/esm/domain/telemetry/telemetryEvent.types.d.ts +375 -0
- package/esm/domain/telemetry/telemetryEvent.types.js +6 -0
- package/esm/domain/telemetry/telemetryEvent.types.js.map +1 -0
- package/esm/domain/tracekit/computeStackTrace.d.ts +5 -0
- package/esm/domain/tracekit/computeStackTrace.js +114 -0
- package/esm/domain/tracekit/computeStackTrace.js.map +1 -0
- package/esm/domain/tracekit/index.d.ts +3 -0
- package/esm/domain/tracekit/index.js +3 -0
- package/esm/domain/tracekit/index.js.map +1 -0
- package/esm/domain/tracekit/tracekit.d.ts +35 -0
- package/esm/domain/tracekit/tracekit.js +91 -0
- package/esm/domain/tracekit/tracekit.js.map +1 -0
- package/esm/domain/tracekit/types.d.ts +44 -0
- package/esm/domain/tracekit/types.js +2 -0
- package/esm/domain/tracekit/types.js.map +1 -0
- package/esm/domain/user/index.d.ts +2 -0
- package/esm/domain/user/index.js +3 -0
- package/esm/domain/user/index.js.map +1 -0
- package/esm/domain/user/user.d.ts +12 -0
- package/esm/domain/user/user.js +30 -0
- package/esm/domain/user/user.js.map +1 -0
- package/esm/domain/user/user.types.d.ts +6 -0
- package/esm/domain/user/user.types.js +2 -0
- package/esm/domain/user/user.types.js.map +1 -0
- package/esm/index.d.ts +63 -0
- package/esm/index.js +61 -0
- package/esm/index.js.map +1 -0
- package/esm/tools/abstractLifeCycle.d.ts +23 -0
- package/esm/tools/abstractLifeCycle.js +26 -0
- package/esm/tools/abstractLifeCycle.js.map +1 -0
- package/esm/tools/boundedBuffer.d.ts +5 -0
- package/esm/tools/boundedBuffer.js +19 -0
- package/esm/tools/boundedBuffer.js.map +1 -0
- package/esm/tools/catchUserErrors.d.ts +1 -0
- package/esm/tools/catchUserErrors.js +16 -0
- package/esm/tools/catchUserErrors.js.map +1 -0
- package/esm/tools/display.d.ts +35 -0
- package/esm/tools/display.js +41 -0
- package/esm/tools/display.js.map +1 -0
- package/esm/tools/experimentalFeatures.d.ts +24 -0
- package/esm/tools/experimentalFeatures.js +40 -0
- package/esm/tools/experimentalFeatures.js.map +1 -0
- package/esm/tools/getGlobalObject.d.ts +4 -0
- package/esm/tools/getGlobalObject.js +33 -0
- package/esm/tools/getGlobalObject.js.map +1 -0
- package/esm/tools/getZoneJsOriginalValue.d.ts +19 -0
- package/esm/tools/getZoneJsOriginalValue.js +26 -0
- package/esm/tools/getZoneJsOriginalValue.js.map +1 -0
- package/esm/tools/instrumentMethod.d.ts +19 -0
- package/esm/tools/instrumentMethod.js +77 -0
- package/esm/tools/instrumentMethod.js.map +1 -0
- package/esm/tools/matchOption.d.ts +8 -0
- package/esm/tools/matchOption.js +33 -0
- package/esm/tools/matchOption.js.map +1 -0
- package/esm/tools/mergeInto.d.ts +25 -0
- package/esm/tools/mergeInto.js +99 -0
- package/esm/tools/mergeInto.js.map +1 -0
- package/esm/tools/monitor.d.ts +9 -0
- package/esm/tools/monitor.js +66 -0
- package/esm/tools/monitor.js.map +1 -0
- package/esm/tools/observable.d.ts +12 -0
- package/esm/tools/observable.js +40 -0
- package/esm/tools/observable.js.map +1 -0
- package/esm/tools/readBytesFromStream.d.ts +11 -0
- package/esm/tools/readBytesFromStream.js +60 -0
- package/esm/tools/readBytesFromStream.js.map +1 -0
- package/esm/tools/sendToExtension.d.ts +3 -0
- package/esm/tools/sendToExtension.js +7 -0
- package/esm/tools/sendToExtension.js.map +1 -0
- package/esm/tools/serialisation/context.d.ts +6 -0
- package/esm/tools/serialisation/context.js +2 -0
- package/esm/tools/serialisation/context.js.map +1 -0
- package/esm/tools/serialisation/contextManager.d.ts +21 -0
- package/esm/tools/serialisation/contextManager.js +66 -0
- package/esm/tools/serialisation/contextManager.js.map +1 -0
- package/esm/tools/serialisation/heavyCustomerDataWarning.d.ts +8 -0
- package/esm/tools/serialisation/heavyCustomerDataWarning.js +14 -0
- package/esm/tools/serialisation/heavyCustomerDataWarning.js.map +1 -0
- package/esm/tools/serialisation/jsonStringify.d.ts +14 -0
- package/esm/tools/serialisation/jsonStringify.js +44 -0
- package/esm/tools/serialisation/jsonStringify.js.map +1 -0
- package/esm/tools/serialisation/sanitize.d.ts +18 -0
- package/esm/tools/serialisation/sanitize.js +181 -0
- package/esm/tools/serialisation/sanitize.js.map +1 -0
- package/esm/tools/timer.d.ts +5 -0
- package/esm/tools/timer.js +16 -0
- package/esm/tools/timer.js.map +1 -0
- package/esm/tools/utils/arrayUtils.d.ts +1 -0
- package/esm/tools/utils/arrayUtils.js +7 -0
- package/esm/tools/utils/arrayUtils.js.map +1 -0
- package/esm/tools/utils/browserDetection.d.ts +2 -0
- package/esm/tools/utils/browserDetection.js +7 -0
- package/esm/tools/utils/browserDetection.js.map +1 -0
- package/esm/tools/utils/byteUtils.d.ts +4 -0
- package/esm/tools/utils/byteUtils.js +26 -0
- package/esm/tools/utils/byteUtils.js.map +1 -0
- package/esm/tools/utils/functionUtils.d.ts +9 -0
- package/esm/tools/utils/functionUtils.js +43 -0
- package/esm/tools/utils/functionUtils.js.map +1 -0
- package/esm/tools/utils/numberUtils.d.ts +8 -0
- package/esm/tools/utils/numberUtils.js +17 -0
- package/esm/tools/utils/numberUtils.js.map +1 -0
- package/esm/tools/utils/objectUtils.d.ts +10 -0
- package/esm/tools/utils/objectUtils.js +19 -0
- package/esm/tools/utils/objectUtils.js.map +1 -0
- package/esm/tools/utils/polyfills.d.ts +24 -0
- package/esm/tools/utils/polyfills.js +95 -0
- package/esm/tools/utils/polyfills.js.map +1 -0
- package/esm/tools/utils/responseUtils.d.ts +2 -0
- package/esm/tools/utils/responseUtils.js +13 -0
- package/esm/tools/utils/responseUtils.js.map +1 -0
- package/esm/tools/utils/stringUtils.d.ts +7 -0
- package/esm/tools/utils/stringUtils.js +26 -0
- package/esm/tools/utils/stringUtils.js.map +1 -0
- package/esm/tools/utils/timeUtils.d.ts +57 -0
- package/esm/tools/utils/timeUtils.js +82 -0
- package/esm/tools/utils/timeUtils.js.map +1 -0
- package/esm/tools/utils/typeUtils.d.ts +4 -0
- package/esm/tools/utils/typeUtils.js +13 -0
- package/esm/tools/utils/typeUtils.js.map +1 -0
- package/esm/tools/utils/urlPolyfill.d.ts +14 -0
- package/esm/tools/utils/urlPolyfill.js +80 -0
- package/esm/tools/utils/urlPolyfill.js.map +1 -0
- package/esm/tools/valueHistory.d.ts +50 -0
- package/esm/tools/valueHistory.js +103 -0
- package/esm/tools/valueHistory.js.map +1 -0
- package/esm/transport/batch.d.ts +19 -0
- package/esm/transport/batch.js +76 -0
- package/esm/transport/batch.js.map +1 -0
- package/esm/transport/eventBridge.d.ts +12 -0
- package/esm/transport/eventBridge.js +29 -0
- package/esm/transport/eventBridge.js.map +1 -0
- package/esm/transport/flushController.d.ts +48 -0
- package/esm/transport/flushController.js +93 -0
- package/esm/transport/flushController.js.map +1 -0
- package/esm/transport/httpRequest.d.ts +37 -0
- package/esm/transport/httpRequest.js +85 -0
- package/esm/transport/httpRequest.js.map +1 -0
- package/esm/transport/index.d.ts +4 -0
- package/esm/transport/index.js +5 -0
- package/esm/transport/index.js.map +1 -0
- package/esm/transport/sendWithRetryStrategy.d.ts +39 -0
- package/esm/transport/sendWithRetryStrategy.js +146 -0
- package/esm/transport/sendWithRetryStrategy.js.map +1 -0
- package/esm/transport/startBatchWithReplica.d.ts +15 -0
- package/esm/transport/startBatchWithReplica.js +33 -0
- package/esm/transport/startBatchWithReplica.js.map +1 -0
- package/package.json +26 -0
- package/src/boot/init.ts +41 -0
- package/src/browser/addEventListener.ts +136 -0
- package/src/browser/cookie.ts +71 -0
- package/src/browser/fetchObservable.ts +112 -0
- package/src/browser/pageExitObservable.ts +69 -0
- package/src/browser/runOnReadyState.ts +15 -0
- package/src/browser/types.ts +40 -0
- package/src/browser/xhrObservable.ts +127 -0
- package/src/domain/configuration/configuration.ts +191 -0
- package/src/domain/configuration/endpointBuilder.ts +134 -0
- package/src/domain/configuration/index.ts +9 -0
- package/src/domain/configuration/intakeSites.ts +5 -0
- package/src/domain/configuration/tags.ts +43 -0
- package/src/domain/configuration/transportConfiguration.ts +71 -0
- package/src/domain/console/consoleObservable.ts +86 -0
- package/src/domain/deflate/index.ts +1 -0
- package/src/domain/deflate/types.ts +41 -0
- package/src/domain/error/error.ts +159 -0
- package/src/domain/error/error.types.ts +47 -0
- package/src/domain/error/trackRuntimeError.ts +21 -0
- package/src/domain/eventRateLimiter/createEventRateLimiter.ts +46 -0
- package/src/domain/report/browser.types.ts +26 -0
- package/src/domain/report/reportObservable.ts +126 -0
- package/src/domain/resourceUtils.ts +17 -0
- package/src/domain/session/oldCookiesMigration.ts +42 -0
- package/src/domain/session/sessionConstants.ts +4 -0
- package/src/domain/session/sessionManager.ts +98 -0
- package/src/domain/session/sessionState.ts +51 -0
- package/src/domain/session/sessionStore.ts +185 -0
- package/src/domain/session/sessionStoreOperations.ts +112 -0
- package/src/domain/session/storeStrategies/sessionInCookie.ts +56 -0
- package/src/domain/session/storeStrategies/sessionInLocalStorage.ts +41 -0
- package/src/domain/session/storeStrategies/sessionStoreStrategy.ts +12 -0
- package/src/domain/synthetics/syntheticsWorkerValues.ts +27 -0
- package/src/domain/telemetry/index.ts +14 -0
- package/src/domain/telemetry/rawTelemetryEvent.types.ts +14 -0
- package/src/domain/telemetry/telemetry.ts +195 -0
- package/src/domain/telemetry/telemetryEvent.types.ts +382 -0
- package/src/domain/tracekit/computeStackTrace.ts +141 -0
- package/src/domain/tracekit/index.ts +3 -0
- package/src/domain/tracekit/tracekit.ts +96 -0
- package/src/domain/tracekit/types.ts +47 -0
- package/src/domain/user/index.ts +2 -0
- package/src/domain/user/user.ts +33 -0
- package/src/domain/user/user.types.ts +6 -0
- package/src/index.ts +128 -0
- package/src/tools/abstractLifeCycle.ts +45 -0
- package/src/tools/boundedBuffer.ts +17 -0
- package/src/tools/catchUserErrors.ts +11 -0
- package/src/tools/display.ts +51 -0
- package/src/tools/experimentalFeatures.ts +43 -0
- package/src/tools/getGlobalObject.ts +31 -0
- package/src/tools/getZoneJsOriginalValue.ts +38 -0
- package/src/tools/instrumentMethod.ts +109 -0
- package/src/tools/matchOption.ts +32 -0
- package/src/tools/mergeInto.ts +177 -0
- package/src/tools/monitor.ts +68 -0
- package/src/tools/observable.ts +40 -0
- package/src/tools/readBytesFromStream.ts +77 -0
- package/src/tools/sendToExtension.ts +12 -0
- package/src/tools/serialisation/context.ts +8 -0
- package/src/tools/serialisation/contextManager.ts +79 -0
- package/src/tools/serialisation/heavyCustomerDataWarning.ts +26 -0
- package/src/tools/serialisation/jsonStringify.ts +53 -0
- package/src/tools/serialisation/sanitize.ts +255 -0
- package/src/tools/timer.ts +21 -0
- package/src/tools/utils/arrayUtils.ts +7 -0
- package/src/tools/utils/browserDetection.ts +7 -0
- package/src/tools/utils/byteUtils.ts +29 -0
- package/src/tools/utils/functionUtils.ts +47 -0
- package/src/tools/utils/numberUtils.ts +19 -0
- package/src/tools/utils/objectUtils.ts +21 -0
- package/src/tools/utils/polyfills.ts +127 -0
- package/src/tools/utils/responseUtils.ts +12 -0
- package/src/tools/utils/stringUtils.ts +28 -0
- package/src/tools/utils/timeUtils.ts +112 -0
- package/src/tools/utils/typeUtils.ts +12 -0
- package/src/tools/utils/urlPolyfill.ts +86 -0
- package/src/tools/valueHistory.ts +120 -0
- package/src/transport/batch.ts +92 -0
- package/src/transport/eventBridge.ts +42 -0
- package/src/transport/flushController.ts +129 -0
- package/src/transport/httpRequest.ts +150 -0
- package/src/transport/index.ts +4 -0
- package/src/transport/sendWithRetryStrategy.ts +203 -0
- package/src/transport/startBatchWithReplica.ts +52 -0
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* DO NOT MODIFY IT BY HAND. Run `yarn rum-events-format:sync` instead.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Schema of all properties of a telemetry event
|
|
8
|
+
*/
|
|
9
|
+
export type TelemetryEvent = TelemetryErrorEvent | TelemetryDebugEvent | TelemetryConfigurationEvent
|
|
10
|
+
/**
|
|
11
|
+
* Schema of all properties of a telemetry error event
|
|
12
|
+
*/
|
|
13
|
+
export type TelemetryErrorEvent = CommonTelemetryProperties & {
|
|
14
|
+
/**
|
|
15
|
+
* The telemetry log information
|
|
16
|
+
*/
|
|
17
|
+
telemetry: {
|
|
18
|
+
/**
|
|
19
|
+
* Telemetry type
|
|
20
|
+
*/
|
|
21
|
+
type?: 'log'
|
|
22
|
+
/**
|
|
23
|
+
* Level/severity of the log
|
|
24
|
+
*/
|
|
25
|
+
status: 'error'
|
|
26
|
+
/**
|
|
27
|
+
* Body of the log
|
|
28
|
+
*/
|
|
29
|
+
message: string
|
|
30
|
+
/**
|
|
31
|
+
* Error properties
|
|
32
|
+
*/
|
|
33
|
+
error?: {
|
|
34
|
+
/**
|
|
35
|
+
* The stack trace or the complementary information about the error
|
|
36
|
+
*/
|
|
37
|
+
stack?: string
|
|
38
|
+
/**
|
|
39
|
+
* The error type or kind (or code in some cases)
|
|
40
|
+
*/
|
|
41
|
+
kind?: string
|
|
42
|
+
[k: string]: unknown
|
|
43
|
+
}
|
|
44
|
+
[k: string]: unknown
|
|
45
|
+
}
|
|
46
|
+
[k: string]: unknown
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Schema of all properties of a telemetry debug event
|
|
50
|
+
*/
|
|
51
|
+
export type TelemetryDebugEvent = CommonTelemetryProperties & {
|
|
52
|
+
/**
|
|
53
|
+
* The telemetry log information
|
|
54
|
+
*/
|
|
55
|
+
telemetry: {
|
|
56
|
+
/**
|
|
57
|
+
* Telemetry type
|
|
58
|
+
*/
|
|
59
|
+
type?: 'log'
|
|
60
|
+
/**
|
|
61
|
+
* Level/severity of the log
|
|
62
|
+
*/
|
|
63
|
+
status: 'debug'
|
|
64
|
+
/**
|
|
65
|
+
* Body of the log
|
|
66
|
+
*/
|
|
67
|
+
message: string
|
|
68
|
+
[k: string]: unknown
|
|
69
|
+
}
|
|
70
|
+
[k: string]: unknown
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Schema of all properties of a telemetry configuration event
|
|
74
|
+
*/
|
|
75
|
+
export type TelemetryConfigurationEvent = CommonTelemetryProperties & {
|
|
76
|
+
/**
|
|
77
|
+
* The telemetry configuration information
|
|
78
|
+
*/
|
|
79
|
+
telemetry: {
|
|
80
|
+
/**
|
|
81
|
+
* Telemetry type
|
|
82
|
+
*/
|
|
83
|
+
type: 'configuration'
|
|
84
|
+
/**
|
|
85
|
+
* Configuration properties
|
|
86
|
+
*/
|
|
87
|
+
configuration: {
|
|
88
|
+
/**
|
|
89
|
+
* The percentage of sessions tracked
|
|
90
|
+
*/
|
|
91
|
+
session_sample_rate?: number
|
|
92
|
+
/**
|
|
93
|
+
* The percentage of telemetry events sent
|
|
94
|
+
*/
|
|
95
|
+
telemetry_sample_rate?: number
|
|
96
|
+
/**
|
|
97
|
+
* The percentage of telemetry configuration events sent after being sampled by telemetry_sample_rate
|
|
98
|
+
*/
|
|
99
|
+
telemetry_configuration_sample_rate?: number
|
|
100
|
+
/**
|
|
101
|
+
* The percentage of requests traced
|
|
102
|
+
*/
|
|
103
|
+
trace_sample_rate?: number
|
|
104
|
+
/**
|
|
105
|
+
* The percentage of sessions with Browser RUM & Session Replay pricing tracked (deprecated in favor of session_replay_sample_rate)
|
|
106
|
+
*/
|
|
107
|
+
premium_sample_rate?: number
|
|
108
|
+
/**
|
|
109
|
+
* The percentage of sessions with Browser RUM & Session Replay pricing tracked (deprecated in favor of session_replay_sample_rate)
|
|
110
|
+
*/
|
|
111
|
+
replay_sample_rate?: number
|
|
112
|
+
/**
|
|
113
|
+
* The percentage of sessions with RUM & Session Replay pricing tracked
|
|
114
|
+
*/
|
|
115
|
+
session_replay_sample_rate?: number
|
|
116
|
+
/**
|
|
117
|
+
* Whether the session replay start is handled manually
|
|
118
|
+
*/
|
|
119
|
+
start_session_replay_recording_manually?: boolean
|
|
120
|
+
/**
|
|
121
|
+
* Whether a proxy is used
|
|
122
|
+
*/
|
|
123
|
+
use_proxy?: boolean
|
|
124
|
+
/**
|
|
125
|
+
* Whether beforeSend callback function is used
|
|
126
|
+
*/
|
|
127
|
+
use_before_send?: boolean
|
|
128
|
+
/**
|
|
129
|
+
* Whether initialization fails silently if the SDK is already initialized
|
|
130
|
+
*/
|
|
131
|
+
silent_multiple_init?: boolean
|
|
132
|
+
/**
|
|
133
|
+
* Whether sessions across subdomains for the same site are tracked
|
|
134
|
+
*/
|
|
135
|
+
track_session_across_subdomains?: boolean
|
|
136
|
+
/**
|
|
137
|
+
* Whether resources are tracked
|
|
138
|
+
*/
|
|
139
|
+
track_resources?: boolean
|
|
140
|
+
/**
|
|
141
|
+
* Whether long tasks are tracked
|
|
142
|
+
*/
|
|
143
|
+
track_long_task?: boolean
|
|
144
|
+
/**
|
|
145
|
+
* Whether a secure cross-site session cookie is used
|
|
146
|
+
*/
|
|
147
|
+
use_cross_site_session_cookie?: boolean
|
|
148
|
+
/**
|
|
149
|
+
* Whether a secure session cookie is used
|
|
150
|
+
*/
|
|
151
|
+
use_secure_session_cookie?: boolean
|
|
152
|
+
/**
|
|
153
|
+
* Whether it is allowed to use LocalStorage when cookies are not available
|
|
154
|
+
*/
|
|
155
|
+
allow_fallback_to_local_storage?: boolean
|
|
156
|
+
/**
|
|
157
|
+
* Whether untrusted events are allowed
|
|
158
|
+
*/
|
|
159
|
+
allow_untrusted_events?: boolean
|
|
160
|
+
/**
|
|
161
|
+
* Attribute to be used to name actions
|
|
162
|
+
*/
|
|
163
|
+
action_name_attribute?: string
|
|
164
|
+
/**
|
|
165
|
+
* Whether the allowed tracing origins list is used (deprecated in favor of use_allowed_tracing_urls)
|
|
166
|
+
*/
|
|
167
|
+
use_allowed_tracing_origins?: boolean
|
|
168
|
+
/**
|
|
169
|
+
* Whether the allowed tracing urls list is used
|
|
170
|
+
*/
|
|
171
|
+
use_allowed_tracing_urls?: boolean
|
|
172
|
+
/**
|
|
173
|
+
* A list of selected tracing propagators
|
|
174
|
+
*/
|
|
175
|
+
selected_tracing_propagators?: ('tracecontext' | 'b3' | 'b3multi')[]
|
|
176
|
+
/**
|
|
177
|
+
* Session replay default privacy level
|
|
178
|
+
*/
|
|
179
|
+
default_privacy_level?: string
|
|
180
|
+
/**
|
|
181
|
+
* Whether the request origins list to ignore when computing the page activity is used
|
|
182
|
+
*/
|
|
183
|
+
use_excluded_activity_urls?: boolean
|
|
184
|
+
/**
|
|
185
|
+
* Whether the Worker is loaded from an external URL
|
|
186
|
+
*/
|
|
187
|
+
use_worker_url?: boolean
|
|
188
|
+
/**
|
|
189
|
+
* Whether user frustrations are tracked
|
|
190
|
+
*/
|
|
191
|
+
track_frustrations?: boolean
|
|
192
|
+
/**
|
|
193
|
+
* Whether the RUM views creation is handled manually
|
|
194
|
+
*/
|
|
195
|
+
track_views_manually?: boolean
|
|
196
|
+
/**
|
|
197
|
+
* Whether user actions are tracked (deprecated in favor of track_user_interactions)
|
|
198
|
+
*/
|
|
199
|
+
track_interactions?: boolean
|
|
200
|
+
/**
|
|
201
|
+
* Whether user actions are tracked
|
|
202
|
+
*/
|
|
203
|
+
track_user_interactions?: boolean
|
|
204
|
+
/**
|
|
205
|
+
* Whether console.error logs, uncaught exceptions and network errors are tracked
|
|
206
|
+
*/
|
|
207
|
+
forward_errors_to_logs?: boolean
|
|
208
|
+
/**
|
|
209
|
+
* The console.* tracked
|
|
210
|
+
*/
|
|
211
|
+
forward_console_logs?: string[] | 'all'
|
|
212
|
+
/**
|
|
213
|
+
* The reports from the Reporting API tracked
|
|
214
|
+
*/
|
|
215
|
+
forward_reports?: string[] | 'all'
|
|
216
|
+
/**
|
|
217
|
+
* Whether local encryption is used
|
|
218
|
+
*/
|
|
219
|
+
use_local_encryption?: boolean
|
|
220
|
+
/**
|
|
221
|
+
* View tracking strategy
|
|
222
|
+
*/
|
|
223
|
+
view_tracking_strategy?:
|
|
224
|
+
| 'ActivityViewTrackingStrategy'
|
|
225
|
+
| 'FragmentViewTrackingStrategy'
|
|
226
|
+
| 'MixedViewTrackingStrategy'
|
|
227
|
+
| 'NavigationViewTrackingStrategy'
|
|
228
|
+
/**
|
|
229
|
+
* Whether RUM events are tracked when the application is in Background
|
|
230
|
+
*/
|
|
231
|
+
track_background_events?: boolean
|
|
232
|
+
/**
|
|
233
|
+
* The period between each Mobile Vital sample (in milliseconds)
|
|
234
|
+
*/
|
|
235
|
+
mobile_vitals_update_period?: number
|
|
236
|
+
/**
|
|
237
|
+
* Whether error monitoring & crash reporting is enabled for the source platform
|
|
238
|
+
*/
|
|
239
|
+
track_errors?: boolean
|
|
240
|
+
/**
|
|
241
|
+
* Whether automatic collection of network requests is enabled
|
|
242
|
+
*/
|
|
243
|
+
track_network_requests?: boolean
|
|
244
|
+
/**
|
|
245
|
+
* Whether tracing features are enabled
|
|
246
|
+
*/
|
|
247
|
+
use_tracing?: boolean
|
|
248
|
+
/**
|
|
249
|
+
* Whether native views are tracked (for cross platform SDKs)
|
|
250
|
+
*/
|
|
251
|
+
track_native_views?: boolean
|
|
252
|
+
/**
|
|
253
|
+
* Whether native error monitoring & crash reporting is enabled (for cross platform SDKs)
|
|
254
|
+
*/
|
|
255
|
+
track_native_errors?: boolean
|
|
256
|
+
/**
|
|
257
|
+
* Whether long task tracking is performed automatically
|
|
258
|
+
*/
|
|
259
|
+
track_native_long_tasks?: boolean
|
|
260
|
+
/**
|
|
261
|
+
* Whether long task tracking is performed automatically for cross platform SDKs
|
|
262
|
+
*/
|
|
263
|
+
track_cross_platform_long_tasks?: boolean
|
|
264
|
+
/**
|
|
265
|
+
* Whether the client has provided a list of first party hosts
|
|
266
|
+
*/
|
|
267
|
+
use_first_party_hosts?: boolean
|
|
268
|
+
/**
|
|
269
|
+
* The type of initialization the SDK used, in case multiple are supported
|
|
270
|
+
*/
|
|
271
|
+
initialization_type?: string
|
|
272
|
+
/**
|
|
273
|
+
* Whether Flutter build and raster time tracking is enabled
|
|
274
|
+
*/
|
|
275
|
+
track_flutter_performance?: boolean
|
|
276
|
+
/**
|
|
277
|
+
* The window duration for batches sent by the SDK (in milliseconds)
|
|
278
|
+
*/
|
|
279
|
+
batch_size?: number
|
|
280
|
+
/**
|
|
281
|
+
* The upload frequency of batches (in milliseconds)
|
|
282
|
+
*/
|
|
283
|
+
batch_upload_frequency?: number
|
|
284
|
+
/**
|
|
285
|
+
* The version of React used in a ReactNative application
|
|
286
|
+
*/
|
|
287
|
+
react_version?: string
|
|
288
|
+
/**
|
|
289
|
+
* The version of ReactNative used in a ReactNative application
|
|
290
|
+
*/
|
|
291
|
+
react_native_version?: string
|
|
292
|
+
/**
|
|
293
|
+
* The version of Dart used in a Flutter application
|
|
294
|
+
*/
|
|
295
|
+
dart_version?: string
|
|
296
|
+
[k: string]: unknown
|
|
297
|
+
}
|
|
298
|
+
[k: string]: unknown
|
|
299
|
+
}
|
|
300
|
+
[k: string]: unknown
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Schema of common properties of Telemetry events
|
|
305
|
+
*/
|
|
306
|
+
export interface CommonTelemetryProperties {
|
|
307
|
+
/**
|
|
308
|
+
* Internal properties
|
|
309
|
+
*/
|
|
310
|
+
_oo: {
|
|
311
|
+
/**
|
|
312
|
+
* Version of the RUM event format
|
|
313
|
+
*/
|
|
314
|
+
readonly format_version: 2
|
|
315
|
+
[k: string]: unknown
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Telemetry event type. Should specify telemetry only.
|
|
319
|
+
*/
|
|
320
|
+
readonly type: 'telemetry'
|
|
321
|
+
/**
|
|
322
|
+
* Start of the event in ms from epoch
|
|
323
|
+
*/
|
|
324
|
+
date: number
|
|
325
|
+
/**
|
|
326
|
+
* The SDK generating the telemetry event
|
|
327
|
+
*/
|
|
328
|
+
service: string
|
|
329
|
+
/**
|
|
330
|
+
* The source of this event
|
|
331
|
+
*/
|
|
332
|
+
readonly source: 'android' | 'ios' | 'browser' | 'flutter' | 'react-native'
|
|
333
|
+
/**
|
|
334
|
+
* The version of the SDK generating the telemetry event
|
|
335
|
+
*/
|
|
336
|
+
version: string
|
|
337
|
+
/**
|
|
338
|
+
* Application properties
|
|
339
|
+
*/
|
|
340
|
+
readonly application?: {
|
|
341
|
+
/**
|
|
342
|
+
* UUID of the application
|
|
343
|
+
*/
|
|
344
|
+
id: string
|
|
345
|
+
[k: string]: unknown
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Session properties
|
|
349
|
+
*/
|
|
350
|
+
session?: {
|
|
351
|
+
/**
|
|
352
|
+
* UUID of the session
|
|
353
|
+
*/
|
|
354
|
+
id: string
|
|
355
|
+
[k: string]: unknown
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* View properties
|
|
359
|
+
*/
|
|
360
|
+
view?: {
|
|
361
|
+
/**
|
|
362
|
+
* UUID of the view
|
|
363
|
+
*/
|
|
364
|
+
id: string
|
|
365
|
+
[k: string]: unknown
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Action properties
|
|
369
|
+
*/
|
|
370
|
+
action?: {
|
|
371
|
+
/**
|
|
372
|
+
* UUID of the action
|
|
373
|
+
*/
|
|
374
|
+
id: string
|
|
375
|
+
[k: string]: unknown
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Enabled experimental features
|
|
379
|
+
*/
|
|
380
|
+
readonly experimental_features?: string[]
|
|
381
|
+
[k: string]: unknown
|
|
382
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { startsWith } from '../../tools/utils/polyfills'
|
|
2
|
+
import type { StackTrace, StackFrame } from './types'
|
|
3
|
+
|
|
4
|
+
const UNKNOWN_FUNCTION = '?'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Computes a stack trace for an exception.
|
|
8
|
+
*/
|
|
9
|
+
export function computeStackTrace(ex: unknown): StackTrace {
|
|
10
|
+
const stack: StackFrame[] = []
|
|
11
|
+
|
|
12
|
+
let stackProperty = tryToGetString(ex, 'stack')
|
|
13
|
+
const exString = String(ex)
|
|
14
|
+
if (stackProperty && startsWith(stackProperty, exString)) {
|
|
15
|
+
stackProperty = stackProperty.slice(exString.length)
|
|
16
|
+
}
|
|
17
|
+
if (stackProperty) {
|
|
18
|
+
stackProperty.split('\n').forEach((line) => {
|
|
19
|
+
const stackFrame =
|
|
20
|
+
parseChromeLine(line) || parseChromeAnonymousLine(line) || parseWinLine(line) || parseGeckoLine(line)
|
|
21
|
+
if (stackFrame) {
|
|
22
|
+
if (!stackFrame.func && stackFrame.line) {
|
|
23
|
+
stackFrame.func = UNKNOWN_FUNCTION
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
stack.push(stackFrame)
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
message: tryToGetString(ex, 'message'),
|
|
33
|
+
name: tryToGetString(ex, 'name'),
|
|
34
|
+
stack,
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
const fileUrl = '((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)'
|
|
38
|
+
const filePosition = '(?::(\\d+))'
|
|
39
|
+
const CHROME_LINE_RE = new RegExp(`^\\s*at (.*?) ?\\(${fileUrl}${filePosition}?${filePosition}?\\)?\\s*$`, 'i')
|
|
40
|
+
|
|
41
|
+
const CHROME_EVAL_RE = new RegExp(`\\((\\S*)${filePosition}${filePosition}\\)`)
|
|
42
|
+
|
|
43
|
+
function parseChromeLine(line: string): StackFrame | undefined {
|
|
44
|
+
const parts = CHROME_LINE_RE.exec(line)
|
|
45
|
+
|
|
46
|
+
if (!parts) {
|
|
47
|
+
return
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const isNative = parts[2] && parts[2].indexOf('native') === 0 // start of line
|
|
51
|
+
const isEval = parts[2] && parts[2].indexOf('eval') === 0 // start of line
|
|
52
|
+
const submatch = CHROME_EVAL_RE.exec(parts[2])
|
|
53
|
+
|
|
54
|
+
if (isEval && submatch) {
|
|
55
|
+
// throw out eval line/column and use top-most line/column number
|
|
56
|
+
parts[2] = submatch[1] // url
|
|
57
|
+
parts[3] = submatch[2] // line
|
|
58
|
+
parts[4] = submatch[3] // column
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
args: isNative ? [parts[2]] : [],
|
|
63
|
+
column: parts[4] ? +parts[4] : undefined,
|
|
64
|
+
func: parts[1] || UNKNOWN_FUNCTION,
|
|
65
|
+
line: parts[3] ? +parts[3] : undefined,
|
|
66
|
+
url: !isNative ? parts[2] : undefined,
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const CHROME_ANONYMOUS_FUNCTION_RE = new RegExp(`^\\s*at ?${fileUrl}${filePosition}?${filePosition}??\\s*$`, 'i')
|
|
71
|
+
|
|
72
|
+
function parseChromeAnonymousLine(line: string): StackFrame | undefined {
|
|
73
|
+
const parts = CHROME_ANONYMOUS_FUNCTION_RE.exec(line)
|
|
74
|
+
|
|
75
|
+
if (!parts) {
|
|
76
|
+
return
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
args: [],
|
|
81
|
+
column: parts[3] ? +parts[3] : undefined,
|
|
82
|
+
func: UNKNOWN_FUNCTION,
|
|
83
|
+
line: parts[2] ? +parts[2] : undefined,
|
|
84
|
+
url: parts[1],
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const WINJS_LINE_RE =
|
|
89
|
+
/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i
|
|
90
|
+
|
|
91
|
+
function parseWinLine(line: string): StackFrame | undefined {
|
|
92
|
+
const parts = WINJS_LINE_RE.exec(line)
|
|
93
|
+
if (!parts) {
|
|
94
|
+
return
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return {
|
|
98
|
+
args: [],
|
|
99
|
+
column: parts[4] ? +parts[4] : undefined,
|
|
100
|
+
func: parts[1] || UNKNOWN_FUNCTION,
|
|
101
|
+
line: +parts[3],
|
|
102
|
+
url: parts[2],
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const GECKO_LINE_RE =
|
|
107
|
+
/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i
|
|
108
|
+
const GECKO_EVAL_RE = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i
|
|
109
|
+
|
|
110
|
+
function parseGeckoLine(line: string): StackFrame | undefined {
|
|
111
|
+
const parts = GECKO_LINE_RE.exec(line)
|
|
112
|
+
if (!parts) {
|
|
113
|
+
return
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const isEval = parts[3] && parts[3].indexOf(' > eval') > -1
|
|
117
|
+
const submatch = GECKO_EVAL_RE.exec(parts[3])
|
|
118
|
+
|
|
119
|
+
if (isEval && submatch) {
|
|
120
|
+
// throw out eval line/column and use top-most line number
|
|
121
|
+
parts[3] = submatch[1]
|
|
122
|
+
parts[4] = submatch[2]
|
|
123
|
+
parts[5] = undefined! // no column when eval
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return {
|
|
127
|
+
args: parts[2] ? parts[2].split(',') : [],
|
|
128
|
+
column: parts[5] ? +parts[5] : undefined,
|
|
129
|
+
func: parts[1] || UNKNOWN_FUNCTION,
|
|
130
|
+
line: parts[4] ? +parts[4] : undefined,
|
|
131
|
+
url: parts[3],
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
function tryToGetString(candidate: unknown, property: string) {
|
|
136
|
+
if (typeof candidate !== 'object' || !candidate || !(property in candidate)) {
|
|
137
|
+
return undefined
|
|
138
|
+
}
|
|
139
|
+
const value = (candidate as { [k: string]: unknown })[property]
|
|
140
|
+
return typeof value === 'string' ? value : undefined
|
|
141
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { instrumentMethodAndCallOriginal } from '../../tools/instrumentMethod'
|
|
2
|
+
import { computeStackTrace } from './computeStackTrace'
|
|
3
|
+
import type { UnhandledErrorCallback, StackTrace } from './types'
|
|
4
|
+
|
|
5
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types
|
|
6
|
+
const ERROR_TYPES_RE =
|
|
7
|
+
/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Cross-browser collection of unhandled errors
|
|
11
|
+
*
|
|
12
|
+
* Supports:
|
|
13
|
+
* - Firefox: full stack trace with line numbers, plus column number
|
|
14
|
+
* on top frame; column number is not guaranteed
|
|
15
|
+
* - Opera: full stack trace with line and column numbers
|
|
16
|
+
* - Chrome: full stack trace with line and column numbers
|
|
17
|
+
* - Safari: line and column number for the top frame only; some frames
|
|
18
|
+
* may be missing, and column number is not guaranteed
|
|
19
|
+
* - IE: line and column number for the top frame only; some frames
|
|
20
|
+
* may be missing, and column number is not guaranteed
|
|
21
|
+
*
|
|
22
|
+
* In theory, TraceKit should work on all of the following versions:
|
|
23
|
+
* - IE5.5+ (only 8.0 tested)
|
|
24
|
+
* - Firefox 0.9+ (only 3.5+ tested)
|
|
25
|
+
* - Opera 7+ (only 10.50 tested; versions 9 and earlier may require
|
|
26
|
+
* Exceptions Have Stacktrace to be enabled in opera:config)
|
|
27
|
+
* - Safari 3+ (only 4+ tested)
|
|
28
|
+
* - Chrome 1+ (only 5+ tested)
|
|
29
|
+
* - Konqueror 3.5+ (untested)
|
|
30
|
+
*
|
|
31
|
+
* Tries to catch all unhandled errors and report them to the
|
|
32
|
+
* callback.
|
|
33
|
+
*
|
|
34
|
+
* Callbacks receive a StackTrace object as described in the
|
|
35
|
+
* computeStackTrace docs.
|
|
36
|
+
*
|
|
37
|
+
* @memberof TraceKit
|
|
38
|
+
* @namespace
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
export function startUnhandledErrorCollection(callback: UnhandledErrorCallback) {
|
|
42
|
+
const { stop: stopInstrumentingOnError } = instrumentOnError(callback)
|
|
43
|
+
const { stop: stopInstrumentingOnUnhandledRejection } = instrumentUnhandledRejection(callback)
|
|
44
|
+
|
|
45
|
+
return {
|
|
46
|
+
stop: () => {
|
|
47
|
+
stopInstrumentingOnError()
|
|
48
|
+
stopInstrumentingOnUnhandledRejection()
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Install a global onerror handler
|
|
55
|
+
*/
|
|
56
|
+
function instrumentOnError(callback: UnhandledErrorCallback) {
|
|
57
|
+
return instrumentMethodAndCallOriginal(window, 'onerror', {
|
|
58
|
+
before(this: any, messageObj: unknown, url?: string, line?: number, column?: number, errorObj?: unknown) {
|
|
59
|
+
let stackTrace: StackTrace
|
|
60
|
+
if (errorObj instanceof Error) {
|
|
61
|
+
stackTrace = computeStackTrace(errorObj)
|
|
62
|
+
} else {
|
|
63
|
+
const stack = [{ url, column, line }]
|
|
64
|
+
const { name, message } = tryToParseMessage(messageObj)
|
|
65
|
+
stackTrace = {
|
|
66
|
+
name,
|
|
67
|
+
message,
|
|
68
|
+
stack,
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
callback(stackTrace, errorObj ?? messageObj)
|
|
72
|
+
},
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function tryToParseMessage(messageObj: unknown) {
|
|
77
|
+
let name
|
|
78
|
+
let message
|
|
79
|
+
if ({}.toString.call(messageObj) === '[object String]') {
|
|
80
|
+
;[, name, message] = ERROR_TYPES_RE.exec(messageObj as string)!
|
|
81
|
+
}
|
|
82
|
+
return { name, message }
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Install a global onunhandledrejection handler
|
|
87
|
+
*/
|
|
88
|
+
function instrumentUnhandledRejection(callback: UnhandledErrorCallback) {
|
|
89
|
+
return instrumentMethodAndCallOriginal(window, 'onunhandledrejection', {
|
|
90
|
+
before(e: PromiseRejectionEvent) {
|
|
91
|
+
const reason = e.reason || 'Empty reason'
|
|
92
|
+
const stack = computeStackTrace(reason)
|
|
93
|
+
callback(stack, reason)
|
|
94
|
+
},
|
|
95
|
+
})
|
|
96
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface BrowserError extends Error {
|
|
2
|
+
sourceURL?: string
|
|
3
|
+
fileName?: string
|
|
4
|
+
line?: string | number
|
|
5
|
+
lineNumber?: string | number
|
|
6
|
+
description?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type UnhandledErrorCallback = (stack: StackTrace, errorObject?: any) => any
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* An object representing a single stack frame.
|
|
13
|
+
* @typedef {Object} StackFrame
|
|
14
|
+
* @property {string=} url The JavaScript or HTML file URL.
|
|
15
|
+
* @property {string=} func The function name, or empty for anonymous functions (if guessing did not work).
|
|
16
|
+
* @property {string[]=} args The arguments passed to the function, if known.
|
|
17
|
+
* @property {number=} line The line number, if known.
|
|
18
|
+
* @property {number=} column The column number, if known.
|
|
19
|
+
* @property {string[]=} context An array of source code lines; the middle element corresponds to the correct line#.
|
|
20
|
+
* @memberof TraceKit
|
|
21
|
+
*/
|
|
22
|
+
export interface StackFrame {
|
|
23
|
+
url?: string
|
|
24
|
+
func?: string
|
|
25
|
+
args?: string[]
|
|
26
|
+
line?: number
|
|
27
|
+
column?: number
|
|
28
|
+
context?: string[]
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* An object representing a JavaScript stack trace.
|
|
33
|
+
* @typedef {Object} StackTrace
|
|
34
|
+
* @property {string=} name The name of the thrown exception.
|
|
35
|
+
* @property {string} message The exception error message.
|
|
36
|
+
* @property {StackFrame[]} stack An array of stack frames.
|
|
37
|
+
* -- method used to collect the stack trace.
|
|
38
|
+
* @memberof TraceKit
|
|
39
|
+
*/
|
|
40
|
+
export interface StackTrace {
|
|
41
|
+
name?: string
|
|
42
|
+
message?: string
|
|
43
|
+
url?: string
|
|
44
|
+
stack: StackFrame[]
|
|
45
|
+
incomplete?: boolean
|
|
46
|
+
partial?: boolean
|
|
47
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { Context } from '../../tools/serialisation/context'
|
|
2
|
+
import { display } from '../../tools/display'
|
|
3
|
+
import { getType } from '../../tools/utils/typeUtils'
|
|
4
|
+
import { assign } from '../../tools/utils/polyfills'
|
|
5
|
+
import type { User } from './user.types'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Clone input data and ensure known user properties (id, name, email)
|
|
9
|
+
* are strings, as defined here:
|
|
10
|
+
* https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#user-related-attributes
|
|
11
|
+
*/
|
|
12
|
+
export function sanitizeUser(newUser: Context): Context {
|
|
13
|
+
// We shallow clone only to prevent mutation of user data.
|
|
14
|
+
const user = assign({}, newUser)
|
|
15
|
+
const keys = ['id', 'name', 'email']
|
|
16
|
+
keys.forEach((key) => {
|
|
17
|
+
if (key in user) {
|
|
18
|
+
user[key] = String(user[key])
|
|
19
|
+
}
|
|
20
|
+
})
|
|
21
|
+
return user
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Simple check to ensure user is valid
|
|
26
|
+
*/
|
|
27
|
+
export function checkUser(newUser: User): boolean {
|
|
28
|
+
const isValid = getType(newUser) === 'object'
|
|
29
|
+
if (!isValid) {
|
|
30
|
+
display.error('Unsupported user:', newUser)
|
|
31
|
+
}
|
|
32
|
+
return isValid
|
|
33
|
+
}
|