@cloudcare/browser-rum 3.3.1 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/dataflux-rum.js +1 -1
- package/cjs/boot/buildEnv.js +1 -1
- package/cjs/boot/perStartRum.js +11 -7
- package/cjs/boot/perStartRum.js.map +1 -1
- package/cjs/boot/recorderApi.js +2 -49
- package/cjs/boot/recorderApi.js.map +1 -1
- package/cjs/boot/recorderApiStub.js +53 -0
- package/cjs/boot/recorderApiStub.js.map +1 -0
- package/cjs/boot/rum.entry.js +6 -7
- package/cjs/boot/rum.entry.js.map +1 -1
- package/cjs/boot/rum.slim.entry.js +13 -0
- package/cjs/boot/rum.slim.entry.js.map +1 -0
- package/cjs/boot/rumEntryFactory.js +15 -0
- package/cjs/boot/rumEntryFactory.js.map +1 -0
- package/cjs/boot/rumPublicApi.js +8 -57
- package/cjs/boot/rumPublicApi.js.map +1 -1
- package/cjs/boot/rumRecorderApiStub.js +19 -0
- package/cjs/boot/rumRecorderApiStub.js.map +1 -0
- package/cjs/boot/rumSlimConfiguration.js +16 -0
- package/cjs/boot/rumSlimConfiguration.js.map +1 -0
- package/cjs/boot/sessionReplayPublicApi.js +62 -0
- package/cjs/boot/sessionReplayPublicApi.js.map +1 -0
- package/cjs/domain/deflate/deflateEncoder.js +2 -4
- package/cjs/domain/deflate/deflateEncoder.js.map +1 -1
- package/cjs/domain/deflate/deflateWorker.js +1 -1
- package/cjs/domain/encoderStreamId.js +11 -0
- package/cjs/domain/encoderStreamId.js.map +1 -0
- package/cjs/domain/replay/record/canvasEncodeWorker.js +1 -1
- package/cjs/transport/startRumBatch.js +2 -2
- package/cjs/transport/startRumBatch.js.map +1 -1
- package/esm/boot/buildEnv.js +1 -1
- package/esm/boot/perStartRum.js +11 -7
- package/esm/boot/perStartRum.js.map +1 -1
- package/esm/boot/recorderApi.js +2 -49
- package/esm/boot/recorderApi.js.map +1 -1
- package/esm/boot/recorderApiStub.js +47 -0
- package/esm/boot/recorderApiStub.js.map +1 -0
- package/esm/boot/rum.entry.js +6 -7
- package/esm/boot/rum.entry.js.map +1 -1
- package/esm/boot/rum.slim.entry.js +7 -0
- package/esm/boot/rum.slim.entry.js.map +1 -0
- package/esm/boot/rumEntryFactory.js +9 -0
- package/esm/boot/rumEntryFactory.js.map +1 -0
- package/esm/boot/rumPublicApi.js +8 -57
- package/esm/boot/rumPublicApi.js.map +1 -1
- package/esm/boot/rumRecorderApiStub.js +13 -0
- package/esm/boot/rumRecorderApiStub.js.map +1 -0
- package/esm/boot/rumSlimConfiguration.js +10 -0
- package/esm/boot/rumSlimConfiguration.js.map +1 -0
- package/esm/boot/sessionReplayPublicApi.js +56 -0
- package/esm/boot/sessionReplayPublicApi.js.map +1 -0
- package/esm/domain/deflate/deflateEncoder.js +2 -4
- package/esm/domain/deflate/deflateEncoder.js.map +1 -1
- package/esm/domain/deflate/deflateWorker.js +1 -1
- package/esm/domain/encoderStreamId.js +5 -0
- package/esm/domain/encoderStreamId.js.map +1 -0
- package/esm/domain/replay/record/canvasEncodeWorker.js +1 -1
- package/esm/transport/startRumBatch.js +2 -2
- package/esm/transport/startRumBatch.js.map +1 -1
- package/package.json +2 -2
- package/src/boot/perStartRum.js +11 -7
- package/src/boot/recorderApi.js +2 -49
- package/src/boot/recorderApiStub.js +47 -0
- package/src/boot/rum.entry.js +6 -8
- package/src/boot/rum.slim.entry.js +7 -0
- package/src/boot/rumEntryFactory.js +10 -0
- package/src/boot/rumPublicApi.js +14 -57
- package/src/boot/rumRecorderApiStub.js +14 -0
- package/src/boot/rumSlimConfiguration.js +11 -0
- package/src/boot/sessionReplayPublicApi.js +57 -0
- package/src/domain/deflate/deflateEncoder.js +2 -4
- package/src/domain/encoderStreamId.js +5 -0
- package/src/transport/startRumBatch.js +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"perStartRum.js","names":["createBoundedBuffer","display","canUseEventBridge","displayAlreadyInitializedError","willSyntheticsInjectRum","noop","timeStampNow","clocksNow","assign","addTelemetryConfiguration","initFetchObservable","deepClone","fetchAndApplyRemoteConfiguration","getEventBridge","getType","validateAndBuildRumConfiguration","createPreStartStrategy","rumPublicApiOptions","getCommonContext","doStartRum","ignoreInitIfSyntheticsWillInjectRum","startDeflateWorker","bufferApiCalls","remoteConfigrationCallbacks","firstStartViewCall","deflateWorker","cachedInitConfiguration","cachedConfiguration","cachedRemoteConfiguration","resourceTrackerManager","tryStartRum","initialViewOptions","trackViewsManually","remove","callback","options","startRumResult","drain","doInit","initConfiguration","remoteConfiguration","eventBridgeAvailable","overrideInitConfigurationForBridge","configuration","sessionStoreStrategyType","warn","compressIntakeRequests","sendContentTypeByJson","subscribe","init","error","getInitConfiguration","getRemoteConfiguration","add","getInternalContext","stopSession","setForcedSession","addTiming","name","time","undefined","startView","startClocks","setViewName","setViewContext","context","setViewContextProperty","key","value","getViewContext","addTypeAction","action","type","commonContext","addAction","addResource","resource","addError","providedError","createResourceTrackerId","createTrackerId","setResourceContext","trackerId","appendResourceContext","finishResource","getResource","_initConfiguration$de","_getEventBridge","applicationId","clientToken","sessionSampleRate","defaultPrivacyLevel","getPrivacyLevel"],"sources":["../../src/boot/perStartRum.js"],"sourcesContent":["import {\n createBoundedBuffer,\n display,\n canUseEventBridge,\n displayAlreadyInitializedError,\n willSyntheticsInjectRum,\n noop,\n timeStampNow,\n clocksNow,\n assign,\n addTelemetryConfiguration,\n initFetchObservable,\n deepClone,\n fetchAndApplyRemoteConfiguration,\n getEventBridge,\n getType\n} from '@cloudcare/browser-core'\nimport { validateAndBuildRumConfiguration } from '../domain/configuration'\n\nexport function createPreStartStrategy(\n rumPublicApiOptions,\n getCommonContext,\n doStartRum\n) {\n var ignoreInitIfSyntheticsWillInjectRum =\n rumPublicApiOptions.ignoreInitIfSyntheticsWillInjectRum\n var startDeflateWorker = rumPublicApiOptions.startDeflateWorker\n var bufferApiCalls = createBoundedBuffer()\n var remoteConfigrationCallbacks = createBoundedBuffer()\n var firstStartViewCall\n\n var deflateWorker\n\n var cachedInitConfiguration\n var cachedConfiguration\n var cachedRemoteConfiguration\n var resourceTrackerManager = rumPublicApiOptions.resourceTrackerManager\n function tryStartRum() {\n if (!cachedInitConfiguration || !cachedConfiguration) {\n return\n }\n\n var initialViewOptions\n\n if (cachedConfiguration.trackViewsManually) {\n if (!firstStartViewCall) {\n return\n }\n // An initial view is always created when starting RUM.\n // When tracking views automatically, any startView call before RUM start creates an extra\n // view.\n // When tracking views manually, we use the ViewOptions from the first startView call as the\n // initial view options, and we remove the actual startView call so we don't create an extra\n // view.\n bufferApiCalls.remove(firstStartViewCall.callback)\n initialViewOptions = firstStartViewCall.options\n }\n\n var startRumResult = doStartRum(\n cachedConfiguration,\n deflateWorker,\n initialViewOptions\n )\n\n bufferApiCalls.drain(startRumResult)\n }\n\n function doInit(initConfiguration, remoteConfiguration) {\n var eventBridgeAvailable = canUseEventBridge()\n if (eventBridgeAvailable) {\n initConfiguration = overrideInitConfigurationForBridge(initConfiguration)\n }\n\n // Update the exposed initConfiguration to reflect the bridge and remote configuration overrides\n cachedInitConfiguration = initConfiguration\n cachedRemoteConfiguration = remoteConfiguration\n remoteConfigrationCallbacks.drain(cachedRemoteConfiguration)\n addTelemetryConfiguration(deepClone(initConfiguration))\n if (cachedConfiguration) {\n displayAlreadyInitializedError('DATAFLUX_RUM', initConfiguration)\n return\n }\n var configuration = validateAndBuildRumConfiguration(initConfiguration)\n if (!configuration) {\n return\n }\n\n if (!eventBridgeAvailable && !configuration.sessionStoreStrategyType) {\n display.warn(\n 'No storage available for session. We will not send any data.'\n )\n return\n }\n\n if (\n configuration.compressIntakeRequests &&\n !configuration.sendContentTypeByJson &&\n !eventBridgeAvailable &&\n startDeflateWorker\n ) {\n deflateWorker = startDeflateWorker(\n configuration,\n 'RUM',\n // Worker initialization can fail asynchronously, especially in Firefox where even CSP\n // issues are reported asynchronously. For now, the SDK will continue its execution even if\n // data won't be sent to Datadog. We could improve this behavior in the future.\n noop\n )\n if (!deflateWorker) {\n // `startDeflateWorker` should have logged an error message explaining the issue\n return\n }\n }\n\n cachedConfiguration = configuration\n // Instrumuent fetch to track network requests\n // This is needed in case the consent is not granted and some cutsomer\n // library (Apollo Client) is storing uninstrumented fetch to be used later\n // The subscrption is needed so that the instrumentation process is completed\n initFetchObservable().subscribe(noop)\n\n tryStartRum()\n }\n\n return {\n init: function (initConfiguration) {\n if (!initConfiguration) {\n display.error('Missing configuration')\n return\n }\n // Set the experimental feature flags as early as possible, so we can use them in most places\n\n // Expose the initial configuration regardless of initialization success.\n cachedInitConfiguration = initConfiguration\n // If we are in a Synthetics test configured to automatically inject a RUM instance, we want\n // to completely discard the customer application RUM instance by ignoring their init() call.\n // But, we should not ignore the init() call from the Synthetics-injected RUM instance, so the\n // internal `ignoreInitIfSyntheticsWillInjectRum` option is here to bypass this condition.\n if (ignoreInitIfSyntheticsWillInjectRum && willSyntheticsInjectRum()) {\n return\n }\n if (initConfiguration.remoteConfiguration) {\n fetchAndApplyRemoteConfiguration(initConfiguration, doInit)\n } else {\n doInit(initConfiguration)\n }\n },\n\n getInitConfiguration: function () {\n return cachedInitConfiguration\n },\n getRemoteConfiguration: function (callback) {\n if (getType(callback) === 'function') {\n if (cachedRemoteConfiguration) {\n callback(cachedRemoteConfiguration)\n } else {\n remoteConfigrationCallbacks.add(callback)\n }\n }\n },\n getInternalContext: noop,\n\n stopSession: noop,\n setForcedSession: function () {\n bufferApiCalls.add((startRumResult) => startRumResult.setForcedSession())\n },\n addTiming: function (name, time) {\n if (time === undefined) {\n time = timeStampNow()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addTiming(name, time)\n })\n },\n\n startView: function (options, startClocks) {\n if (startClocks === undefined) {\n startClocks = clocksNow()\n }\n const callback = function (startRumResult) {\n startRumResult.startView(options, startClocks)\n }\n bufferApiCalls.add(callback)\n\n if (!firstStartViewCall) {\n firstStartViewCall = { options: options, callback: callback }\n tryStartRum()\n }\n },\n setViewName(name) {\n bufferApiCalls.add((startRumResult) => startRumResult.setViewName(name))\n },\n\n setViewContext(context) {\n bufferApiCalls.add((startRumResult) =>\n startRumResult.setViewContext(context)\n )\n },\n\n setViewContextProperty(key, value) {\n bufferApiCalls.add((startRumResult) =>\n startRumResult.setViewContextProperty(key, value)\n )\n },\n\n getViewContext: () => {},\n\n addTypeAction: function (action, type, commonContext) {\n if (commonContext === undefined) {\n commonContext = getCommonContext()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addTypeAction(action, type, commonContext)\n })\n },\n addAction: function (action, commonContext) {\n if (commonContext === undefined) {\n commonContext = getCommonContext()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addAction(action, commonContext)\n })\n },\n addResource: function (resource, commonContext) {\n if (commonContext === undefined) {\n commonContext = getCommonContext()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addResource(resource, commonContext)\n })\n },\n addError: function (providedError, commonContext) {\n if (commonContext === undefined) {\n commonContext = getCommonContext()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addError(providedError, commonContext)\n })\n },\n createResourceTrackerId: function () {\n return resourceTrackerManager.createTrackerId()\n },\n setResourceContext: function (trackerId, context) {\n resourceTrackerManager.setResourceContext(trackerId, context)\n },\n appendResourceContext: function (trackerId, context) {\n resourceTrackerManager.appendResourceContext(trackerId, context)\n },\n finishResource: function (trackerId) {\n resourceTrackerManager.finishResource(trackerId)\n },\n getResource: function (trackerId) {\n return resourceTrackerManager.getResource(trackerId)\n }\n }\n}\n\nfunction overrideInitConfigurationForBridge(initConfiguration) {\n return assign({}, initConfiguration, {\n applicationId: '00000000-aaaa-0000-aaaa-000000000000',\n clientToken: 'empty',\n sessionSampleRate: 100,\n defaultPrivacyLevel:\n initConfiguration.defaultPrivacyLevel ??\n getEventBridge()?.getPrivacyLevel()\n })\n}\n"],"mappings":"AAAA,SACEA,mBAAmB,EACnBC,OAAO,EACPC,iBAAiB,EACjBC,8BAA8B,EAC9BC,u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EAAEjB,OAAO,EAAE;MACnDpC,sBAAsB,CAACsD,qBAAqB,CAACD,SAAS,EAAEjB,OAAO,CAAC;IAClE,CAAC;IACDmB,cAAc,EAAE,SAAhBA,cAAcA,CAAYF,SAAS,EAAE;MACnCrD,sBAAsB,CAACuD,cAAc,CAACF,SAAS,CAAC;IAClD,CAAC;IACDG,WAAW,EAAE,SAAbA,WAAWA,CAAYH,SAAS,EAAE;MAChC,OAAOrD,sBAAsB,CAACwD,WAAW,CAACH,SAAS,CAAC;IACtD;EACF,CAAC;AACH;AAEA,SAASxC,kCAAkCA,CAACH,iBAAiB,EAAE;EAAA,IAAA+C,qBAAA,EAAAC,eAAA;EAC7D,OAAO/E,MAAM,CAAC,CAAC,CAAC,EAAE+B,iBAAiB,EAAE;IACnCiD,aAAa,EAAE,sCAAsC;IACrDC,WAAW,EAAE,OAAO;IACpBC,iBAAiB,EAAE,GAAG;IACtBC,mBAAmB,GAAAL,qBAAA,GACjB/C,iBAAiB,CAACoD,mBAAmB,cAAAL,qBAAA,cAAAA,qBAAA,IAAAC,eAAA,GACrC1E,cAAc,CAAC,CAAC,cAAA0E,eAAA,uBAAhBA,eAAA,CAAkBK,eAAe,CAAC;EACtC,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"perStartRum.js","names":["createBoundedBuffer","display","canUseEventBridge","displayAlreadyInitializedError","willSyntheticsInjectRum","noop","timeStampNow","clocksNow","assign","addTelemetryConfiguration","initFetchObservable","deepClone","fetchAndApplyRemoteConfiguration","getEventBridge","getType","validateAndBuildRumConfiguration","createPreStartStrategy","rumPublicApiOptions","getCommonContext","doStartRum","ignoreInitIfSyntheticsWillInjectRum","startCompressionWorker","overrideInitConfiguration","bufferApiCalls","remoteConfigrationCallbacks","firstStartViewCall","compressionWorker","cachedInitConfiguration","cachedConfiguration","cachedRemoteConfiguration","resourceTrackerManager","tryStartRum","initialViewOptions","trackViewsManually","remove","callback","options","startRumResult","drain","doInit","initConfiguration","remoteConfiguration","eventBridgeAvailable","overrideInitConfigurationForBridge","configuration","sessionStoreStrategyType","warn","compressIntakeRequests","sendContentTypeByJson","subscribe","init","error","getInitConfiguration","getRemoteConfiguration","add","getInternalContext","stopSession","setForcedSession","addTiming","name","time","undefined","startView","startClocks","setViewName","setViewContext","context","setViewContextProperty","key","value","getViewContext","addTypeAction","action","type","commonContext","addAction","addResource","resource","addError","providedError","createResourceTrackerId","createTrackerId","setResourceContext","trackerId","appendResourceContext","finishResource","getResource","_initConfiguration$de","_getEventBridge","applicationId","clientToken","sessionSampleRate","defaultPrivacyLevel","getPrivacyLevel"],"sources":["../../src/boot/perStartRum.js"],"sourcesContent":["import {\n createBoundedBuffer,\n display,\n canUseEventBridge,\n displayAlreadyInitializedError,\n willSyntheticsInjectRum,\n noop,\n timeStampNow,\n clocksNow,\n assign,\n addTelemetryConfiguration,\n initFetchObservable,\n deepClone,\n fetchAndApplyRemoteConfiguration,\n getEventBridge,\n getType\n} from '@cloudcare/browser-core'\nimport { validateAndBuildRumConfiguration } from '../domain/configuration'\n\nexport function createPreStartStrategy(\n rumPublicApiOptions,\n getCommonContext,\n doStartRum\n) {\n var ignoreInitIfSyntheticsWillInjectRum =\n rumPublicApiOptions.ignoreInitIfSyntheticsWillInjectRum\n var startCompressionWorker = rumPublicApiOptions.startCompressionWorker\n var overrideInitConfiguration = rumPublicApiOptions.overrideInitConfiguration\n var bufferApiCalls = createBoundedBuffer()\n var remoteConfigrationCallbacks = createBoundedBuffer()\n var firstStartViewCall\n\n var compressionWorker\n\n var cachedInitConfiguration\n var cachedConfiguration\n var cachedRemoteConfiguration\n var resourceTrackerManager = rumPublicApiOptions.resourceTrackerManager\n function tryStartRum() {\n if (!cachedInitConfiguration || !cachedConfiguration) {\n return\n }\n\n var initialViewOptions\n\n if (cachedConfiguration.trackViewsManually) {\n if (!firstStartViewCall) {\n return\n }\n // An initial view is always created when starting RUM.\n // When tracking views automatically, any startView call before RUM start creates an extra\n // view.\n // When tracking views manually, we use the ViewOptions from the first startView call as the\n // initial view options, and we remove the actual startView call so we don't create an extra\n // view.\n bufferApiCalls.remove(firstStartViewCall.callback)\n initialViewOptions = firstStartViewCall.options\n }\n\n var startRumResult = doStartRum(\n cachedConfiguration,\n compressionWorker,\n initialViewOptions\n )\n\n bufferApiCalls.drain(startRumResult)\n }\n\n function doInit(initConfiguration, remoteConfiguration) {\n var eventBridgeAvailable = canUseEventBridge()\n if (eventBridgeAvailable) {\n initConfiguration = overrideInitConfigurationForBridge(initConfiguration)\n }\n if (overrideInitConfiguration) {\n initConfiguration = overrideInitConfiguration(initConfiguration)\n }\n\n // Update the exposed initConfiguration to reflect the bridge and remote configuration overrides\n cachedInitConfiguration = initConfiguration\n cachedRemoteConfiguration = remoteConfiguration\n remoteConfigrationCallbacks.drain(cachedRemoteConfiguration)\n addTelemetryConfiguration(deepClone(initConfiguration))\n if (cachedConfiguration) {\n displayAlreadyInitializedError('DATAFLUX_RUM', initConfiguration)\n return\n }\n var configuration = validateAndBuildRumConfiguration(initConfiguration)\n if (!configuration) {\n return\n }\n\n if (!eventBridgeAvailable && !configuration.sessionStoreStrategyType) {\n display.warn(\n 'No storage available for session. We will not send any data.'\n )\n return\n }\n\n if (\n configuration.compressIntakeRequests &&\n !configuration.sendContentTypeByJson &&\n !eventBridgeAvailable &&\n startCompressionWorker\n ) {\n compressionWorker = startCompressionWorker(\n configuration,\n 'RUM',\n // Worker initialization can fail asynchronously, especially in Firefox where even CSP\n // issues are reported asynchronously. For now, the SDK will continue its execution even if\n // data won't be sent to Datadog. We could improve this behavior in the future.\n noop\n )\n if (!compressionWorker) {\n // The compression worker starter should have logged an error message explaining the issue\n return\n }\n }\n\n cachedConfiguration = configuration\n // Instrumuent fetch to track network requests\n // This is needed in case the consent is not granted and some cutsomer\n // library (Apollo Client) is storing uninstrumented fetch to be used later\n // The subscrption is needed so that the instrumentation process is completed\n initFetchObservable().subscribe(noop)\n\n tryStartRum()\n }\n\n return {\n init: function (initConfiguration) {\n if (!initConfiguration) {\n display.error('Missing configuration')\n return\n }\n // Set the experimental feature flags as early as possible, so we can use them in most places\n\n // Expose the initial configuration regardless of initialization success.\n cachedInitConfiguration = initConfiguration\n // If we are in a Synthetics test configured to automatically inject a RUM instance, we want\n // to completely discard the customer application RUM instance by ignoring their init() call.\n // But, we should not ignore the init() call from the Synthetics-injected RUM instance, so the\n // internal `ignoreInitIfSyntheticsWillInjectRum` option is here to bypass this condition.\n if (ignoreInitIfSyntheticsWillInjectRum && willSyntheticsInjectRum()) {\n return\n }\n if (initConfiguration.remoteConfiguration) {\n fetchAndApplyRemoteConfiguration(initConfiguration, doInit)\n } else {\n doInit(initConfiguration)\n }\n },\n\n getInitConfiguration: function () {\n return cachedInitConfiguration\n },\n getRemoteConfiguration: function (callback) {\n if (getType(callback) === 'function') {\n if (cachedRemoteConfiguration) {\n callback(cachedRemoteConfiguration)\n } else {\n remoteConfigrationCallbacks.add(callback)\n }\n }\n },\n getInternalContext: noop,\n\n stopSession: noop,\n setForcedSession: function () {\n bufferApiCalls.add((startRumResult) => startRumResult.setForcedSession())\n },\n addTiming: function (name, time) {\n if (time === undefined) {\n time = timeStampNow()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addTiming(name, time)\n })\n },\n\n startView: function (options, startClocks) {\n if (startClocks === undefined) {\n startClocks = clocksNow()\n }\n const callback = function (startRumResult) {\n startRumResult.startView(options, startClocks)\n }\n bufferApiCalls.add(callback)\n\n if (!firstStartViewCall) {\n firstStartViewCall = { options: options, callback: callback }\n tryStartRum()\n }\n },\n setViewName(name) {\n bufferApiCalls.add((startRumResult) => startRumResult.setViewName(name))\n },\n\n setViewContext(context) {\n bufferApiCalls.add((startRumResult) =>\n startRumResult.setViewContext(context)\n )\n },\n\n setViewContextProperty(key, value) {\n bufferApiCalls.add((startRumResult) =>\n startRumResult.setViewContextProperty(key, value)\n )\n },\n\n getViewContext: () => {},\n\n addTypeAction: function (action, type, commonContext) {\n if (commonContext === undefined) {\n commonContext = getCommonContext()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addTypeAction(action, type, commonContext)\n })\n },\n addAction: function (action, commonContext) {\n if (commonContext === undefined) {\n commonContext = getCommonContext()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addAction(action, commonContext)\n })\n },\n addResource: function (resource, commonContext) {\n if (commonContext === undefined) {\n commonContext = getCommonContext()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addResource(resource, commonContext)\n })\n },\n addError: function (providedError, commonContext) {\n if (commonContext === undefined) {\n commonContext = getCommonContext()\n }\n bufferApiCalls.add(function (startRumResult) {\n startRumResult.addError(providedError, commonContext)\n })\n },\n createResourceTrackerId: function () {\n return resourceTrackerManager.createTrackerId()\n },\n setResourceContext: function (trackerId, context) {\n resourceTrackerManager.setResourceContext(trackerId, context)\n },\n appendResourceContext: function (trackerId, context) {\n resourceTrackerManager.appendResourceContext(trackerId, context)\n },\n finishResource: function (trackerId) {\n resourceTrackerManager.finishResource(trackerId)\n },\n getResource: function (trackerId) {\n return resourceTrackerManager.getResource(trackerId)\n }\n }\n}\n\nfunction overrideInitConfigurationForBridge(initConfiguration) {\n return assign({}, initConfiguration, {\n applicationId: '00000000-aaaa-0000-aaaa-000000000000',\n clientToken: 'empty',\n sessionSampleRate: 100,\n defaultPrivacyLevel:\n initConfiguration.defaultPrivacyLevel ??\n getEventBridge()?.getPrivacyLevel()\n })\n}\n"],"mappings":"AAAA,SACEA,mBAAmB,EACnBC,OAAO,EACPC,iBAAiB,EACjBC,8BAA8B,EAC9BC,uBAAuB,EACvBC,IAAI,EACJC,YAAY,EACZC,SAAS,EACTC,MAAM,EACNC,yBAAyB,EACzBC,mBAAmB,EACnBC,SAAS,EACTC,gCAAgC,EAChCC,cAAc,EACdC,OAAO,QACF,yBAAyB;AAChC,SAASC,gCAAgC,QAAQ,yBAAyB;AAE1E,OAAO,SAASC,sBAAsBA,CACpCC,mBAAmB,EACnBC,gBAAgB,EAChBC,UAAU,EAC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E,SAAhBA,cAAcA,CAAYF,SAAS,EAAE;MACnCrD,sBAAsB,CAACuD,cAAc,CAACF,SAAS,CAAC;IAClD,CAAC;IACDG,WAAW,EAAE,SAAbA,WAAWA,CAAYH,SAAS,EAAE;MAChC,OAAOrD,sBAAsB,CAACwD,WAAW,CAACH,SAAS,CAAC;IACtD;EACF,CAAC;AACH;AAEA,SAASxC,kCAAkCA,CAACH,iBAAiB,EAAE;EAAA,IAAA+C,qBAAA,EAAAC,eAAA;EAC7D,OAAOhF,MAAM,CAAC,CAAC,CAAC,EAAEgC,iBAAiB,EAAE;IACnCiD,aAAa,EAAE,sCAAsC;IACrDC,WAAW,EAAE,OAAO;IACpBC,iBAAiB,EAAE,GAAG;IACtBC,mBAAmB,GAAAL,qBAAA,GACjB/C,iBAAiB,CAACoD,mBAAmB,cAAAL,qBAAA,cAAAA,qBAAA,IAAAC,eAAA,GACrC3E,cAAc,CAAC,CAAC,cAAA2E,eAAA,uBAAhBA,eAAA,CAAkBK,eAAe,CAAC;EACtC,CAAC,CAAC;AACJ","ignoreList":[]}
|
package/esm/boot/recorderApi.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { noop, runOnReadyState, LifeCycleEventType, canUseEventBridge, bridgeSupports, BridgeCapability, PageExitReason } from '@cloudcare/browser-core';
|
|
2
|
+
import { makeRecorderApiStub } from './recorderApiStub';
|
|
2
3
|
import { getReplayStats as getReplayStatsImpl } from '../domain/replay/replayStats';
|
|
3
4
|
import { createDeflateEncoder, startDeflateWorker, DeflateWorkerStatus, getDeflateWorkerStatus, DeflateEncoderStreamId } from '../domain/deflate';
|
|
4
5
|
var RecorderStatus = {
|
|
@@ -14,55 +15,7 @@ var RecorderStatus = {
|
|
|
14
15
|
};
|
|
15
16
|
export function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {
|
|
16
17
|
if (canUseEventBridge() && !bridgeSupports(BridgeCapability.RECORDS) || !isBrowserSupported()) {
|
|
17
|
-
return
|
|
18
|
-
start: noop,
|
|
19
|
-
stop: noop,
|
|
20
|
-
takeSubsequentFullSnapshot: noop,
|
|
21
|
-
snapshotCanvas: function snapshotCanvas() {
|
|
22
|
-
return {
|
|
23
|
-
ok: false,
|
|
24
|
-
reason: 'not_recording'
|
|
25
|
-
};
|
|
26
|
-
},
|
|
27
|
-
getSerializedNodeIdForDebug: function getSerializedNodeIdForDebug() {
|
|
28
|
-
return undefined;
|
|
29
|
-
},
|
|
30
|
-
getLastAutoCanvasSnapshotResultForDebug: function getLastAutoCanvasSnapshotResultForDebug() {
|
|
31
|
-
return undefined;
|
|
32
|
-
},
|
|
33
|
-
getAutoCanvasSnapshotDebugHistoryForDebug: function getAutoCanvasSnapshotDebugHistoryForDebug() {
|
|
34
|
-
return undefined;
|
|
35
|
-
},
|
|
36
|
-
getLastCanvasMutationForDebug: function getLastCanvasMutationForDebug() {
|
|
37
|
-
return undefined;
|
|
38
|
-
},
|
|
39
|
-
getCanvasMutationHistoryForDebug: function getCanvasMutationHistoryForDebug() {
|
|
40
|
-
return undefined;
|
|
41
|
-
},
|
|
42
|
-
getLastDomMutationForDebug: function getLastDomMutationForDebug() {
|
|
43
|
-
return undefined;
|
|
44
|
-
},
|
|
45
|
-
getDomMutationHistoryForDebug: function getDomMutationHistoryForDebug() {
|
|
46
|
-
return undefined;
|
|
47
|
-
},
|
|
48
|
-
getLastReplaySegmentFlushForDebug: function getLastReplaySegmentFlushForDebug() {
|
|
49
|
-
return undefined;
|
|
50
|
-
},
|
|
51
|
-
getReplaySegmentFlushHistoryForDebug: function getReplaySegmentFlushHistoryForDebug() {
|
|
52
|
-
return undefined;
|
|
53
|
-
},
|
|
54
|
-
getReplayPerformanceForDebug: function getReplayPerformanceForDebug() {
|
|
55
|
-
return undefined;
|
|
56
|
-
},
|
|
57
|
-
flushReplayMutationsForDebug: noop,
|
|
58
|
-
getReplayStats: function getReplayStats() {
|
|
59
|
-
return undefined;
|
|
60
|
-
},
|
|
61
|
-
onRumStart: noop,
|
|
62
|
-
isRecording: function isRecording() {
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
};
|
|
18
|
+
return makeRecorderApiStub();
|
|
66
19
|
}
|
|
67
20
|
var state = {
|
|
68
21
|
status: RecorderStatus.Stopped
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recorderApi.js","names":["noop","runOnReadyState","LifeCycleEventType","canUseEventBridge","bridgeSupports","BridgeCapability","PageExitReason","getReplayStats","getReplayStatsImpl","createDeflateEncoder","startDeflateWorker","DeflateWorkerStatus","getDeflateWorkerStatus","DeflateEncoderStreamId","RecorderStatus","Stopped","IntentToStart","Starting","Started","makeRecorderApi","startRecordingImpl","createDeflateWorkerImpl","RECORDS","isBrowserSupported","start","stop","takeSubsequentFullSnapshot","snapshotCanvas","ok","reason","getSerializedNodeIdForDebug","undefined","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","getReplayPerformanceForDebug","flushReplayMutationsForDebug","onRumStart","isRecording","state","status","startStrategy","stopStrategy","options","lifeCycle","configuration","sessionManager","viewContexts","worker","subscribe","SESSION_EXPIRED","PAGE_EXITED","pageExitEvent","UNLOADING","SESSION_RENEWED","cachedDeflateEncoder","getOrCreateDeflateEncoder","REPLAY","session","findTrackedSession","sessionReplayAllowed","deflateEncoder","recordingImpl","stopRecording","canvas","node","Initialized","viewId","Array","from","CSSSupportsRule","URL","createObjectURL","NodeList","prototype"],"sources":["../../src/boot/recorderApi.js"],"sourcesContent":["import {\n noop,\n runOnReadyState,\n LifeCycleEventType,\n canUseEventBridge,\n bridgeSupports,\n BridgeCapability,\n PageExitReason\n} from '@cloudcare/browser-core'\n\nimport { getReplayStats as getReplayStatsImpl } from '../domain/replay/replayStats'\nimport {\n createDeflateEncoder,\n startDeflateWorker,\n DeflateWorkerStatus,\n getDeflateWorkerStatus,\n DeflateEncoderStreamId\n} from '../domain/deflate'\nvar RecorderStatus = {\n // The recorder is stopped.\n Stopped: 0,\n // The user started the recording while it wasn't possible yet. The recorder should start as soon\n // as possible.\n IntentToStart: 1,\n // The recorder is starting. It does not record anything yet.\n Starting: 2,\n // The recorder is started, it records the session.\n Started: 3\n}\n\nexport function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {\n if (\n (canUseEventBridge() && !bridgeSupports(BridgeCapability.RECORDS)) ||\n !isBrowserSupported()\n ) {\n return {\n start: noop,\n stop: noop,\n takeSubsequentFullSnapshot: noop,\n snapshotCanvas: function () {\n return {\n ok: false,\n reason: 'not_recording'\n }\n },\n getSerializedNodeIdForDebug: function () {\n return undefined\n },\n getLastAutoCanvasSnapshotResultForDebug: function () {\n return undefined\n },\n getAutoCanvasSnapshotDebugHistoryForDebug: function () {\n return undefined\n },\n getLastCanvasMutationForDebug: function () {\n return undefined\n },\n getCanvasMutationHistoryForDebug: function () {\n return undefined\n },\n getLastDomMutationForDebug: function () {\n return undefined\n },\n getDomMutationHistoryForDebug: function () {\n return undefined\n },\n getLastReplaySegmentFlushForDebug: function () {\n return undefined\n },\n getReplaySegmentFlushHistoryForDebug: function () {\n return undefined\n },\n getReplayPerformanceForDebug: function () {\n return undefined\n },\n flushReplayMutationsForDebug: noop,\n getReplayStats: function () {\n return undefined\n },\n onRumStart: noop,\n isRecording: function () {\n return false\n }\n }\n }\n\n var state = {\n status: RecorderStatus.Stopped\n }\n\n var startStrategy = function () {\n state = { status: RecorderStatus.IntentToStart }\n }\n var stopStrategy = function () {\n state = { status: RecorderStatus.Stopped }\n }\n var takeSubsequentFullSnapshot = function () {}\n var snapshotCanvas = function () {\n return {\n ok: false,\n reason: 'not_recording'\n }\n }\n var getSerializedNodeIdForDebug = function () {\n return undefined\n }\n var getLastAutoCanvasSnapshotResultForDebug = function () {\n return undefined\n }\n var getAutoCanvasSnapshotDebugHistoryForDebug = function () {\n return undefined\n }\n var getLastCanvasMutationForDebug = function () {\n return undefined\n }\n var getCanvasMutationHistoryForDebug = function () {\n return undefined\n }\n var getLastDomMutationForDebug = function () {\n return undefined\n }\n var getDomMutationHistoryForDebug = function () {\n return undefined\n }\n var getLastReplaySegmentFlushForDebug = function () {\n return undefined\n }\n var getReplaySegmentFlushHistoryForDebug = function () {\n return undefined\n }\n var getReplayPerformanceForDebug = function () {\n return undefined\n }\n var flushReplayMutationsForDebug = noop\n return {\n start: function (options) {\n startStrategy(options)\n },\n stop: function () {\n stopStrategy()\n },\n\n onRumStart: function (\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n worker\n ) {\n lifeCycle.subscribe(LifeCycleEventType.SESSION_EXPIRED, function () {\n if (\n state.status === RecorderStatus.Starting ||\n state.status === RecorderStatus.Started\n ) {\n stopStrategy()\n state = { status: RecorderStatus.IntentToStart }\n }\n })\n lifeCycle.subscribe(\n LifeCycleEventType.PAGE_EXITED,\n function (pageExitEvent) {\n if (pageExitEvent.reason === PageExitReason.UNLOADING) {\n stopStrategy()\n }\n }\n )\n lifeCycle.subscribe(LifeCycleEventType.SESSION_RENEWED, function () {\n if (state.status === RecorderStatus.IntentToStart) {\n startStrategy()\n }\n })\n var cachedDeflateEncoder\n function getOrCreateDeflateEncoder() {\n if (!cachedDeflateEncoder) {\n if (!worker) {\n worker = startDeflateWorker(\n configuration,\n 'Session Replay',\n function () {\n stopStrategy()\n },\n createDeflateWorkerImpl\n )\n }\n if (worker) {\n cachedDeflateEncoder = createDeflateEncoder(\n worker,\n DeflateEncoderStreamId.REPLAY\n )\n }\n }\n return cachedDeflateEncoder\n }\n startStrategy = function (options) {\n var session = sessionManager.findTrackedSession()\n if (!session || !session.sessionReplayAllowed) {\n state = { status: RecorderStatus.IntentToStart }\n return\n }\n\n if (\n state.status === RecorderStatus.Starting ||\n state.status === RecorderStatus.Started\n ) {\n return\n }\n\n state = { status: RecorderStatus.Starting }\n\n runOnReadyState('interactive', function () {\n if (state.status !== RecorderStatus.Starting) {\n return\n }\n var deflateEncoder = getOrCreateDeflateEncoder()\n if (!deflateEncoder) {\n state = {\n status: RecorderStatus.Stopped\n }\n return\n }\n var recordingImpl = startRecordingImpl(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n deflateEncoder\n )\n state = {\n status: RecorderStatus.Started,\n stopRecording: recordingImpl.stop,\n takeSubsequentFullSnapshot: recordingImpl.takeSubsequentFullSnapshot,\n snapshotCanvas: recordingImpl.snapshotCanvas || noop,\n getSerializedNodeIdForDebug:\n recordingImpl.getSerializedNodeIdForDebug || noop,\n getLastAutoCanvasSnapshotResultForDebug:\n recordingImpl.getLastAutoCanvasSnapshotResultForDebug || noop,\n getAutoCanvasSnapshotDebugHistoryForDebug:\n recordingImpl.getAutoCanvasSnapshotDebugHistoryForDebug || noop,\n getLastCanvasMutationForDebug:\n recordingImpl.getLastCanvasMutationForDebug || noop,\n getCanvasMutationHistoryForDebug:\n recordingImpl.getCanvasMutationHistoryForDebug || noop,\n getLastDomMutationForDebug:\n recordingImpl.getLastDomMutationForDebug || noop,\n getDomMutationHistoryForDebug:\n recordingImpl.getDomMutationHistoryForDebug || noop,\n getLastReplaySegmentFlushForDebug:\n recordingImpl.getLastReplaySegmentFlushForDebug || noop,\n getReplaySegmentFlushHistoryForDebug:\n recordingImpl.getReplaySegmentFlushHistoryForDebug || noop,\n getReplayPerformanceForDebug:\n recordingImpl.getReplayPerformanceForDebug || noop,\n flushReplayMutationsForDebug:\n recordingImpl.flushReplayMutationsForDebug || noop\n }\n })\n }\n\n stopStrategy = function () {\n if (state.status === RecorderStatus.Stopped) {\n return\n }\n\n if (state.status === RecorderStatus.Started) {\n state.stopRecording()\n }\n\n state = {\n status: RecorderStatus.Stopped\n }\n }\n takeSubsequentFullSnapshot = function () {\n state.takeSubsequentFullSnapshot()\n }\n snapshotCanvas = function (canvas, options) {\n if (state.status === RecorderStatus.Started) {\n return state.snapshotCanvas(canvas, options)\n }\n return {\n ok: false,\n reason: 'not_recording'\n }\n }\n getSerializedNodeIdForDebug = function (node) {\n if (state.status === RecorderStatus.Started) {\n return state.getSerializedNodeIdForDebug(node)\n }\n return undefined\n }\n getLastAutoCanvasSnapshotResultForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastAutoCanvasSnapshotResultForDebug()\n }\n return undefined\n }\n getAutoCanvasSnapshotDebugHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getAutoCanvasSnapshotDebugHistoryForDebug()\n }\n return undefined\n }\n getLastCanvasMutationForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastCanvasMutationForDebug()\n }\n return undefined\n }\n getCanvasMutationHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getCanvasMutationHistoryForDebug()\n }\n return undefined\n }\n getLastDomMutationForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastDomMutationForDebug()\n }\n return undefined\n }\n getDomMutationHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getDomMutationHistoryForDebug()\n }\n return undefined\n }\n getLastReplaySegmentFlushForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastReplaySegmentFlushForDebug()\n }\n return undefined\n }\n getReplaySegmentFlushHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getReplaySegmentFlushHistoryForDebug()\n }\n return undefined\n }\n getReplayPerformanceForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getReplayPerformanceForDebug()\n }\n return undefined\n }\n flushReplayMutationsForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n state.flushReplayMutationsForDebug()\n }\n }\n if (state.status === RecorderStatus.IntentToStart) {\n startStrategy()\n }\n },\n takeSubsequentFullSnapshot() {\n takeSubsequentFullSnapshot()\n },\n snapshotCanvas: function (canvas, options) {\n return snapshotCanvas(canvas, options)\n },\n getSerializedNodeIdForDebug: function (node) {\n return getSerializedNodeIdForDebug(node)\n },\n getLastReplaySegmentFlushForDebug: function () {\n return getLastReplaySegmentFlushForDebug()\n },\n getLastAutoCanvasSnapshotResultForDebug: function () {\n return getLastAutoCanvasSnapshotResultForDebug()\n },\n getAutoCanvasSnapshotDebugHistoryForDebug: function () {\n return getAutoCanvasSnapshotDebugHistoryForDebug()\n },\n getLastCanvasMutationForDebug: function () {\n return getLastCanvasMutationForDebug()\n },\n getCanvasMutationHistoryForDebug: function () {\n return getCanvasMutationHistoryForDebug()\n },\n getLastDomMutationForDebug: function () {\n return getLastDomMutationForDebug()\n },\n getDomMutationHistoryForDebug: function () {\n return getDomMutationHistoryForDebug()\n },\n getReplaySegmentFlushHistoryForDebug: function () {\n return getReplaySegmentFlushHistoryForDebug()\n },\n getReplayPerformanceForDebug: function () {\n return getReplayPerformanceForDebug()\n },\n flushReplayMutationsForDebug: function () {\n flushReplayMutationsForDebug()\n },\n isRecording: function () {\n return (\n getDeflateWorkerStatus() === DeflateWorkerStatus.Initialized &&\n state.status === RecorderStatus.Started\n )\n },\n getReplayStats: function (viewId) {\n return getDeflateWorkerStatus() === DeflateWorkerStatus.Initialized\n ? getReplayStatsImpl(viewId)\n : undefined\n }\n }\n}\n\n/**\n * Test for Browser features used while recording\n */\nfunction isBrowserSupported() {\n return (\n // Array.from is a bit less supported by browsers than CSSSupportsRule, but has higher chances\n // to be polyfilled. Test for both to be more confident. We could add more things if we find out\n // this test is not sufficient.\n typeof Array.from === 'function' &&\n typeof CSSSupportsRule === 'function' &&\n typeof URL.createObjectURL === 'function' &&\n 'forEach' in NodeList.prototype\n )\n}\n"],"mappings":"AAAA,SACEA,IAAI,EACJC,eAAe,EACfC,kBAAkB,EAClBC,iBAAiB,EACjBC,cAAc,EACdC,gBAAgB,EAChBC,cAAc,QACT,yBAAyB;AAEhC,SAASC,cAAc,IAAIC,kBAAkB,QAAQ,8BAA8B;AACnF,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,mBAAmB,EACnBC,sBAAsB,EACtBC,sBAAsB,QACj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3,"file":"recorderApi.js","names":["noop","runOnReadyState","LifeCycleEventType","canUseEventBridge","bridgeSupports","BridgeCapability","PageExitReason","makeRecorderApiStub","getReplayStats","getReplayStatsImpl","createDeflateEncoder","startDeflateWorker","DeflateWorkerStatus","getDeflateWorkerStatus","DeflateEncoderStreamId","RecorderStatus","Stopped","IntentToStart","Starting","Started","makeRecorderApi","startRecordingImpl","createDeflateWorkerImpl","RECORDS","isBrowserSupported","state","status","startStrategy","stopStrategy","takeSubsequentFullSnapshot","snapshotCanvas","ok","reason","getSerializedNodeIdForDebug","undefined","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","getReplayPerformanceForDebug","flushReplayMutationsForDebug","start","options","stop","onRumStart","lifeCycle","configuration","sessionManager","viewContexts","worker","subscribe","SESSION_EXPIRED","PAGE_EXITED","pageExitEvent","UNLOADING","SESSION_RENEWED","cachedDeflateEncoder","getOrCreateDeflateEncoder","REPLAY","session","findTrackedSession","sessionReplayAllowed","deflateEncoder","recordingImpl","stopRecording","canvas","node","isRecording","Initialized","viewId","Array","from","CSSSupportsRule","URL","createObjectURL","NodeList","prototype"],"sources":["../../src/boot/recorderApi.js"],"sourcesContent":["import {\n noop,\n runOnReadyState,\n LifeCycleEventType,\n canUseEventBridge,\n bridgeSupports,\n BridgeCapability,\n PageExitReason\n} from '@cloudcare/browser-core'\n\nimport { makeRecorderApiStub } from './recorderApiStub'\nimport { getReplayStats as getReplayStatsImpl } from '../domain/replay/replayStats'\nimport {\n createDeflateEncoder,\n startDeflateWorker,\n DeflateWorkerStatus,\n getDeflateWorkerStatus,\n DeflateEncoderStreamId\n} from '../domain/deflate'\nvar RecorderStatus = {\n // The recorder is stopped.\n Stopped: 0,\n // The user started the recording while it wasn't possible yet. The recorder should start as soon\n // as possible.\n IntentToStart: 1,\n // The recorder is starting. It does not record anything yet.\n Starting: 2,\n // The recorder is started, it records the session.\n Started: 3\n}\n\nexport function makeRecorderApi(startRecordingImpl, createDeflateWorkerImpl) {\n if (\n (canUseEventBridge() && !bridgeSupports(BridgeCapability.RECORDS)) ||\n !isBrowserSupported()\n ) {\n return makeRecorderApiStub()\n }\n\n var state = {\n status: RecorderStatus.Stopped\n }\n\n var startStrategy = function () {\n state = { status: RecorderStatus.IntentToStart }\n }\n var stopStrategy = function () {\n state = { status: RecorderStatus.Stopped }\n }\n var takeSubsequentFullSnapshot = function () {}\n var snapshotCanvas = function () {\n return {\n ok: false,\n reason: 'not_recording'\n }\n }\n var getSerializedNodeIdForDebug = function () {\n return undefined\n }\n var getLastAutoCanvasSnapshotResultForDebug = function () {\n return undefined\n }\n var getAutoCanvasSnapshotDebugHistoryForDebug = function () {\n return undefined\n }\n var getLastCanvasMutationForDebug = function () {\n return undefined\n }\n var getCanvasMutationHistoryForDebug = function () {\n return undefined\n }\n var getLastDomMutationForDebug = function () {\n return undefined\n }\n var getDomMutationHistoryForDebug = function () {\n return undefined\n }\n var getLastReplaySegmentFlushForDebug = function () {\n return undefined\n }\n var getReplaySegmentFlushHistoryForDebug = function () {\n return undefined\n }\n var getReplayPerformanceForDebug = function () {\n return undefined\n }\n var flushReplayMutationsForDebug = noop\n return {\n start: function (options) {\n startStrategy(options)\n },\n stop: function () {\n stopStrategy()\n },\n\n onRumStart: function (\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n worker\n ) {\n lifeCycle.subscribe(LifeCycleEventType.SESSION_EXPIRED, function () {\n if (\n state.status === RecorderStatus.Starting ||\n state.status === RecorderStatus.Started\n ) {\n stopStrategy()\n state = { status: RecorderStatus.IntentToStart }\n }\n })\n lifeCycle.subscribe(\n LifeCycleEventType.PAGE_EXITED,\n function (pageExitEvent) {\n if (pageExitEvent.reason === PageExitReason.UNLOADING) {\n stopStrategy()\n }\n }\n )\n lifeCycle.subscribe(LifeCycleEventType.SESSION_RENEWED, function () {\n if (state.status === RecorderStatus.IntentToStart) {\n startStrategy()\n }\n })\n var cachedDeflateEncoder\n function getOrCreateDeflateEncoder() {\n if (!cachedDeflateEncoder) {\n if (!worker) {\n worker = startDeflateWorker(\n configuration,\n 'Session Replay',\n function () {\n stopStrategy()\n },\n createDeflateWorkerImpl\n )\n }\n if (worker) {\n cachedDeflateEncoder = createDeflateEncoder(\n worker,\n DeflateEncoderStreamId.REPLAY\n )\n }\n }\n return cachedDeflateEncoder\n }\n startStrategy = function (options) {\n var session = sessionManager.findTrackedSession()\n if (!session || !session.sessionReplayAllowed) {\n state = { status: RecorderStatus.IntentToStart }\n return\n }\n\n if (\n state.status === RecorderStatus.Starting ||\n state.status === RecorderStatus.Started\n ) {\n return\n }\n\n state = { status: RecorderStatus.Starting }\n\n runOnReadyState('interactive', function () {\n if (state.status !== RecorderStatus.Starting) {\n return\n }\n var deflateEncoder = getOrCreateDeflateEncoder()\n if (!deflateEncoder) {\n state = {\n status: RecorderStatus.Stopped\n }\n return\n }\n var recordingImpl = startRecordingImpl(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n deflateEncoder\n )\n state = {\n status: RecorderStatus.Started,\n stopRecording: recordingImpl.stop,\n takeSubsequentFullSnapshot: recordingImpl.takeSubsequentFullSnapshot,\n snapshotCanvas: recordingImpl.snapshotCanvas || noop,\n getSerializedNodeIdForDebug:\n recordingImpl.getSerializedNodeIdForDebug || noop,\n getLastAutoCanvasSnapshotResultForDebug:\n recordingImpl.getLastAutoCanvasSnapshotResultForDebug || noop,\n getAutoCanvasSnapshotDebugHistoryForDebug:\n recordingImpl.getAutoCanvasSnapshotDebugHistoryForDebug || noop,\n getLastCanvasMutationForDebug:\n recordingImpl.getLastCanvasMutationForDebug || noop,\n getCanvasMutationHistoryForDebug:\n recordingImpl.getCanvasMutationHistoryForDebug || noop,\n getLastDomMutationForDebug:\n recordingImpl.getLastDomMutationForDebug || noop,\n getDomMutationHistoryForDebug:\n recordingImpl.getDomMutationHistoryForDebug || noop,\n getLastReplaySegmentFlushForDebug:\n recordingImpl.getLastReplaySegmentFlushForDebug || noop,\n getReplaySegmentFlushHistoryForDebug:\n recordingImpl.getReplaySegmentFlushHistoryForDebug || noop,\n getReplayPerformanceForDebug:\n recordingImpl.getReplayPerformanceForDebug || noop,\n flushReplayMutationsForDebug:\n recordingImpl.flushReplayMutationsForDebug || noop\n }\n })\n }\n\n stopStrategy = function () {\n if (state.status === RecorderStatus.Stopped) {\n return\n }\n\n if (state.status === RecorderStatus.Started) {\n state.stopRecording()\n }\n\n state = {\n status: RecorderStatus.Stopped\n }\n }\n takeSubsequentFullSnapshot = function () {\n state.takeSubsequentFullSnapshot()\n }\n snapshotCanvas = function (canvas, options) {\n if (state.status === RecorderStatus.Started) {\n return state.snapshotCanvas(canvas, options)\n }\n return {\n ok: false,\n reason: 'not_recording'\n }\n }\n getSerializedNodeIdForDebug = function (node) {\n if (state.status === RecorderStatus.Started) {\n return state.getSerializedNodeIdForDebug(node)\n }\n return undefined\n }\n getLastAutoCanvasSnapshotResultForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastAutoCanvasSnapshotResultForDebug()\n }\n return undefined\n }\n getAutoCanvasSnapshotDebugHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getAutoCanvasSnapshotDebugHistoryForDebug()\n }\n return undefined\n }\n getLastCanvasMutationForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastCanvasMutationForDebug()\n }\n return undefined\n }\n getCanvasMutationHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getCanvasMutationHistoryForDebug()\n }\n return undefined\n }\n getLastDomMutationForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastDomMutationForDebug()\n }\n return undefined\n }\n getDomMutationHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getDomMutationHistoryForDebug()\n }\n return undefined\n }\n getLastReplaySegmentFlushForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getLastReplaySegmentFlushForDebug()\n }\n return undefined\n }\n getReplaySegmentFlushHistoryForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getReplaySegmentFlushHistoryForDebug()\n }\n return undefined\n }\n getReplayPerformanceForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n return state.getReplayPerformanceForDebug()\n }\n return undefined\n }\n flushReplayMutationsForDebug = function () {\n if (state.status === RecorderStatus.Started) {\n state.flushReplayMutationsForDebug()\n }\n }\n if (state.status === RecorderStatus.IntentToStart) {\n startStrategy()\n }\n },\n takeSubsequentFullSnapshot() {\n takeSubsequentFullSnapshot()\n },\n snapshotCanvas: function (canvas, options) {\n return snapshotCanvas(canvas, options)\n },\n getSerializedNodeIdForDebug: function (node) {\n return getSerializedNodeIdForDebug(node)\n },\n getLastReplaySegmentFlushForDebug: function () {\n return getLastReplaySegmentFlushForDebug()\n },\n getLastAutoCanvasSnapshotResultForDebug: function () {\n return getLastAutoCanvasSnapshotResultForDebug()\n },\n getAutoCanvasSnapshotDebugHistoryForDebug: function () {\n return getAutoCanvasSnapshotDebugHistoryForDebug()\n },\n getLastCanvasMutationForDebug: function () {\n return getLastCanvasMutationForDebug()\n },\n getCanvasMutationHistoryForDebug: function () {\n return getCanvasMutationHistoryForDebug()\n },\n getLastDomMutationForDebug: function () {\n return getLastDomMutationForDebug()\n },\n getDomMutationHistoryForDebug: function () {\n return getDomMutationHistoryForDebug()\n },\n getReplaySegmentFlushHistoryForDebug: function () {\n return getReplaySegmentFlushHistoryForDebug()\n },\n getReplayPerformanceForDebug: function () {\n return getReplayPerformanceForDebug()\n },\n flushReplayMutationsForDebug: function () {\n flushReplayMutationsForDebug()\n },\n isRecording: function () {\n return (\n getDeflateWorkerStatus() === DeflateWorkerStatus.Initialized &&\n state.status === RecorderStatus.Started\n )\n },\n getReplayStats: function (viewId) {\n return getDeflateWorkerStatus() === DeflateWorkerStatus.Initialized\n ? getReplayStatsImpl(viewId)\n : undefined\n }\n }\n}\n\n/**\n * Test for Browser features used while recording\n */\nfunction isBrowserSupported() {\n return (\n // Array.from is a bit less supported by browsers than CSSSupportsRule, but has higher chances\n // to be polyfilled. Test for both to be more confident. We could add more things if we find out\n // this test is not sufficient.\n typeof Array.from === 'function' &&\n typeof CSSSupportsRule === 'function' &&\n typeof URL.createObjectURL === 'function' &&\n 'forEach' in NodeList.prototype\n )\n}\n"],"mappings":"AAAA,SACEA,IAAI,EACJC,eAAe,EACfC,kBAAkB,EAClBC,iBAAiB,EACjBC,cAAc,EACdC,gBAAgB,EAChBC,cAAc,QACT,yBAAyB;AAEhC,SAASC,mBAAmB,QAAQ,mBAAmB;AACvD,SAASC,cAAc,IAAIC,kBAAkB,QAAQ,8BAA8B;AACnF,SACEC,oBAAoB,EACpBC,kBAAkB,EAClBC,mBAAmB,EACnBC,sBAAsB,EACtBC,sBAAsB,QACjB,mBAAmB;AAC1B,IAAIC,cAAc,GAAG;EACnB;EACAC,OAAO,EAAE,CAAC;EACV;EACA;EACAC,aAAa,EAAE,CAAC;EAChB;EACAC,QAAQ,EAAE,CAAC;EACX;EACAC,OAAO,EAAE;AACX,CAAC;AAED,OAAO,SAASC,eAAeA,CAACC,kBAAkB,EAAEC,uBAAuB,EAAE;EAC3E,IACGnB,iBAAiB,CAAC,CAAC,IAAI,CAACC,cAAc,CAACC,gBAAgB,CAACkB,OAAO,CAAC,IACjE,CAACC,kBAAkB,CAAC,CAAC,EACrB;IACA,OAAOjB,mBAAmB,CAAC,CAAC;EAC9B;EAEA,IAAIkB,KAAK,GAAG;IACVC,MAAM,EAAEX,cAAc,CAACC;EACzB,CAAC;EAED,IAAIW,aAAa,GAAG,SAAhBA,aAAaA,CAAA,EAAe;IAC9BF,KAAK,GAAG;MAAEC,MAAM,EAAEX,cAAc,CAACE;IAAc,CAAC;EAClD,CAAC;EACD,IAAIW,YAAY,GAAG,SAAfA,YAAYA,CAAA,EAAe;IAC7BH,KAAK,GAAG;MA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WAAW,IAC5D/C,KAAK,CAACC,MAAM,KAAKX,cAAc,CAACI,OAAO;IAE3C,CAAC;IACDX,cAAc,EAAE,SAAhBA,cAAcA,CAAYiE,MAAM,EAAE;MAChC,OAAO5D,sBAAsB,CAAC,CAAC,KAAKD,mBAAmB,CAAC4D,WAAW,GAC/D/D,kBAAkB,CAACgE,MAAM,CAAC,GAC1BvC,SAAS;IACf;EACF,CAAC;AACH;;AAEA;AACA;AACA;AACA,SAASV,kBAAkBA,CAAA,EAAG;EAC5B;IACE;IACA;IACA;IACA,OAAOkD,KAAK,CAACC,IAAI,KAAK,UAAU,IAChC,OAAOC,eAAe,KAAK,UAAU,IACrC,OAAOC,GAAG,CAACC,eAAe,KAAK,UAAU,IACzC,SAAS,IAAIC,QAAQ,CAACC;EAAS;AAEnC","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { noop } from '@cloudcare/browser-core';
|
|
2
|
+
import { makeRumRecorderApiStub } from './rumRecorderApiStub';
|
|
3
|
+
export function makeRecorderApiStub() {
|
|
4
|
+
var recorderApi = makeRumRecorderApiStub();
|
|
5
|
+
recorderApi.start = noop;
|
|
6
|
+
recorderApi.stop = noop;
|
|
7
|
+
recorderApi.takeSubsequentFullSnapshot = noop;
|
|
8
|
+
recorderApi.snapshotCanvas = function () {
|
|
9
|
+
return {
|
|
10
|
+
ok: false,
|
|
11
|
+
reason: 'not_recording'
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
recorderApi.getSerializedNodeIdForDebug = function () {
|
|
15
|
+
return undefined;
|
|
16
|
+
};
|
|
17
|
+
recorderApi.getLastAutoCanvasSnapshotResultForDebug = function () {
|
|
18
|
+
return undefined;
|
|
19
|
+
};
|
|
20
|
+
recorderApi.getAutoCanvasSnapshotDebugHistoryForDebug = function () {
|
|
21
|
+
return undefined;
|
|
22
|
+
};
|
|
23
|
+
recorderApi.getLastCanvasMutationForDebug = function () {
|
|
24
|
+
return undefined;
|
|
25
|
+
};
|
|
26
|
+
recorderApi.getCanvasMutationHistoryForDebug = function () {
|
|
27
|
+
return undefined;
|
|
28
|
+
};
|
|
29
|
+
recorderApi.getLastDomMutationForDebug = function () {
|
|
30
|
+
return undefined;
|
|
31
|
+
};
|
|
32
|
+
recorderApi.getDomMutationHistoryForDebug = function () {
|
|
33
|
+
return undefined;
|
|
34
|
+
};
|
|
35
|
+
recorderApi.getLastReplaySegmentFlushForDebug = function () {
|
|
36
|
+
return undefined;
|
|
37
|
+
};
|
|
38
|
+
recorderApi.getReplaySegmentFlushHistoryForDebug = function () {
|
|
39
|
+
return undefined;
|
|
40
|
+
};
|
|
41
|
+
recorderApi.getReplayPerformanceForDebug = function () {
|
|
42
|
+
return undefined;
|
|
43
|
+
};
|
|
44
|
+
recorderApi.flushReplayMutationsForDebug = noop;
|
|
45
|
+
return recorderApi;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=recorderApiStub.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recorderApiStub.js","names":["noop","makeRumRecorderApiStub","makeRecorderApiStub","recorderApi","start","stop","takeSubsequentFullSnapshot","snapshotCanvas","ok","reason","getSerializedNodeIdForDebug","undefined","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","getReplayPerformanceForDebug","flushReplayMutationsForDebug"],"sources":["../../src/boot/recorderApiStub.js"],"sourcesContent":["import { noop } from '@cloudcare/browser-core'\nimport { makeRumRecorderApiStub } from './rumRecorderApiStub'\n\nexport function makeRecorderApiStub() {\n var recorderApi = makeRumRecorderApiStub()\n recorderApi.start = noop\n recorderApi.stop = noop\n recorderApi.takeSubsequentFullSnapshot = noop\n recorderApi.snapshotCanvas = function () {\n return {\n ok: false,\n reason: 'not_recording'\n }\n }\n recorderApi.getSerializedNodeIdForDebug = function () {\n return undefined\n }\n recorderApi.getLastAutoCanvasSnapshotResultForDebug = function () {\n return undefined\n }\n recorderApi.getAutoCanvasSnapshotDebugHistoryForDebug = function () {\n return undefined\n }\n recorderApi.getLastCanvasMutationForDebug = function () {\n return undefined\n }\n recorderApi.getCanvasMutationHistoryForDebug = function () {\n return undefined\n }\n recorderApi.getLastDomMutationForDebug = function () {\n return undefined\n }\n recorderApi.getDomMutationHistoryForDebug = function () {\n return undefined\n }\n recorderApi.getLastReplaySegmentFlushForDebug = function () {\n return undefined\n }\n recorderApi.getReplaySegmentFlushHistoryForDebug = function () {\n return undefined\n }\n recorderApi.getReplayPerformanceForDebug = function () {\n return undefined\n }\n recorderApi.flushReplayMutationsForDebug = noop\n return recorderApi\n}\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,yBAAyB;AAC9C,SAASC,sBAAsB,QAAQ,sBAAsB;AAE7D,OAAO,SAASC,mBAAmBA,CAAA,EAAG;EACpC,IAAIC,WAAW,GAAGF,sBAAsB,CAAC,CAAC;EAC1CE,WAAW,CAACC,KAAK,GAAGJ,IAAI;EACxBG,WAAW,CAACE,IAAI,GAAGL,IAAI;EACvBG,WAAW,CAACG,0BAA0B,GAAGN,IAAI;EAC7CG,WAAW,CAACI,cAAc,GAAG,YAAY;IACvC,OAAO;MACLC,EAAE,EAAE,KAAK;MACTC,MAAM,EAAE;IACV,CAAC;EACH,CAAC;EACDN,WAAW,CAACO,2BAA2B,GAAG,YAAY;IACpD,OAAOC,SAAS;EAClB,CAAC;EACDR,WAAW,CAACS,uCAAuC,GAAG,YAAY;IAChE,OAAOD,SAAS;EAClB,CAAC;EACDR,WAAW,CAACU,yCAAyC,GAAG,YAAY;IAClE,OAAOF,SAAS;EAClB,CAAC;EACDR,WAAW,CAACW,6BAA6B,GAAG,YAAY;IACtD,OAAOH,SAAS;EAClB,CAAC;EACDR,WAAW,CAACY,gCAAgC,GAAG,YAAY;IACzD,OAAOJ,SAAS;EAClB,CAAC;EACDR,WAAW,CAACa,0BAA0B,GAAG,YAAY;IACnD,OAAOL,SAAS;EAClB,CAAC;EACDR,WAAW,CAACc,6BAA6B,GAAG,YAAY;IACtD,OAAON,SAAS;EAClB,CAAC;EACDR,WAAW,CAACe,iCAAiC,GAAG,YAAY;IAC1D,OAAOP,SAAS;EAClB,CAAC;EACDR,WAAW,CAACgB,oCAAoC,GAAG,YAAY;IAC7D,OAAOR,SAAS;EAClB,CAAC;EACDR,WAAW,CAACiB,4BAA4B,GAAG,YAAY;IACrD,OAAOT,SAAS;EAClB,CAAC;EACDR,WAAW,CAACkB,4BAA4B,GAAGrB,IAAI;EAC/C,OAAOG,WAAW;AACpB","ignoreList":[]}
|
package/esm/boot/rum.entry.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { defineGlobal, getGlobalObject } from '@cloudcare/browser-core';
|
|
2
|
-
import { startRum } from './rum';
|
|
3
|
-
import { makeRumPublicApi } from './rumPublicApi';
|
|
4
1
|
import { startRecording } from './startRecording';
|
|
5
2
|
import { makeRecorderApi } from './recorderApi';
|
|
6
3
|
import { createDeflateEncoder, startDeflateWorker } from '../domain/deflate';
|
|
4
|
+
import { makeRumEntry } from './rumEntryFactory';
|
|
5
|
+
import { makeSessionReplayPublicApi } from './sessionReplayPublicApi';
|
|
7
6
|
var recorderApi = makeRecorderApi(startRecording);
|
|
8
|
-
export var datafluxRum =
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export var datafluxRum = makeRumEntry(recorderApi, {
|
|
8
|
+
startCompressionWorker: startDeflateWorker,
|
|
9
|
+
createCompressionEncoder: createDeflateEncoder,
|
|
10
|
+
makeRecorderPublicApi: makeSessionReplayPublicApi
|
|
11
11
|
});
|
|
12
|
-
defineGlobal(getGlobalObject(), 'DATAFLUX_RUM', datafluxRum);
|
|
13
12
|
//# sourceMappingURL=rum.entry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rum.entry.js","names":["
|
|
1
|
+
{"version":3,"file":"rum.entry.js","names":["startRecording","makeRecorderApi","createDeflateEncoder","startDeflateWorker","makeRumEntry","makeSessionReplayPublicApi","recorderApi","datafluxRum","startCompressionWorker","createCompressionEncoder","makeRecorderPublicApi"],"sources":["../../src/boot/rum.entry.js"],"sourcesContent":["import { startRecording } from './startRecording'\nimport { makeRecorderApi } from './recorderApi'\nimport { createDeflateEncoder, startDeflateWorker } from '../domain/deflate'\nimport { makeRumEntry } from './rumEntryFactory'\nimport { makeSessionReplayPublicApi } from './sessionReplayPublicApi'\nvar recorderApi = makeRecorderApi(startRecording)\nexport var datafluxRum = makeRumEntry(recorderApi, {\n startCompressionWorker: startDeflateWorker,\n createCompressionEncoder: createDeflateEncoder,\n makeRecorderPublicApi: makeSessionReplayPublicApi\n})\n"],"mappings":"AAAA,SAASA,cAAc,QAAQ,kBAAkB;AACjD,SAASC,eAAe,QAAQ,eAAe;AAC/C,SAASC,oBAAoB,EAAEC,kBAAkB,QAAQ,mBAAmB;AAC5E,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,0BAA0B,QAAQ,0BAA0B;AACrE,IAAIC,WAAW,GAAGL,eAAe,CAACD,cAAc,CAAC;AACjD,OAAO,IAAIO,WAAW,GAAGH,YAAY,CAACE,WAAW,EAAE;EACjDE,sBAAsB,EAAEL,kBAAkB;EAC1CM,wBAAwB,EAAEP,oBAAoB;EAC9CQ,qBAAqB,EAAEL;AACzB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { makeRumRecorderApiStub } from './rumRecorderApiStub';
|
|
2
|
+
import { makeRumEntry } from './rumEntryFactory';
|
|
3
|
+
import { forceRumSlimConfiguration } from './rumSlimConfiguration';
|
|
4
|
+
export var datafluxRum = makeRumEntry(makeRumRecorderApiStub(), {
|
|
5
|
+
overrideInitConfiguration: forceRumSlimConfiguration
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=rum.slim.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rum.slim.entry.js","names":["makeRumRecorderApiStub","makeRumEntry","forceRumSlimConfiguration","datafluxRum","overrideInitConfiguration"],"sources":["../../src/boot/rum.slim.entry.js"],"sourcesContent":["import { makeRumRecorderApiStub } from './rumRecorderApiStub'\nimport { makeRumEntry } from './rumEntryFactory'\nimport { forceRumSlimConfiguration } from './rumSlimConfiguration'\n\nexport var datafluxRum = makeRumEntry(makeRumRecorderApiStub(), {\n overrideInitConfiguration: forceRumSlimConfiguration\n})\n"],"mappings":"AAAA,SAASA,sBAAsB,QAAQ,sBAAsB;AAC7D,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,yBAAyB,QAAQ,wBAAwB;AAElE,OAAO,IAAIC,WAAW,GAAGF,YAAY,CAACD,sBAAsB,CAAC,CAAC,EAAE;EAC9DI,yBAAyB,EAAEF;AAC7B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { defineGlobal, getGlobalObject } from '@cloudcare/browser-core';
|
|
2
|
+
import { startRum } from './rum';
|
|
3
|
+
import { makeRumPublicApi } from './rumPublicApi';
|
|
4
|
+
export function makeRumEntry(recorderApi, options) {
|
|
5
|
+
var datafluxRum = makeRumPublicApi(startRum, recorderApi, options);
|
|
6
|
+
defineGlobal(getGlobalObject(), 'DATAFLUX_RUM', datafluxRum);
|
|
7
|
+
return datafluxRum;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=rumEntryFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rumEntryFactory.js","names":["defineGlobal","getGlobalObject","startRum","makeRumPublicApi","makeRumEntry","recorderApi","options","datafluxRum"],"sources":["../../src/boot/rumEntryFactory.js"],"sourcesContent":["import { defineGlobal, getGlobalObject } from '@cloudcare/browser-core'\nimport { startRum } from './rum'\nimport { makeRumPublicApi } from './rumPublicApi'\n\nexport function makeRumEntry(recorderApi, options) {\n var datafluxRum = makeRumPublicApi(startRum, recorderApi, options)\n defineGlobal(getGlobalObject(), 'DATAFLUX_RUM', datafluxRum)\n return datafluxRum\n}\n\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,eAAe,QAAQ,yBAAyB;AACvE,SAASC,QAAQ,QAAQ,OAAO;AAChC,SAASC,gBAAgB,QAAQ,gBAAgB;AAEjD,OAAO,SAASC,YAAYA,CAACC,WAAW,EAAEC,OAAO,EAAE;EACjD,IAAIC,WAAW,GAAGJ,gBAAgB,CAACD,QAAQ,EAAEG,WAAW,EAAEC,OAAO,CAAC;EAClEN,YAAY,CAACC,eAAe,CAAC,CAAC,EAAE,cAAc,EAAEM,WAAW,CAAC;EAC5D,OAAOA,WAAW;AACpB","ignoreList":[]}
|
package/esm/boot/rumPublicApi.js
CHANGED
|
@@ -32,16 +32,16 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
32
32
|
}
|
|
33
33
|
var strategy = createPreStartStrategy(assign({}, options, {
|
|
34
34
|
resourceTrackerManager: resourceTrackerManager
|
|
35
|
-
}), getCommonContext, function (configuration,
|
|
35
|
+
}), getCommonContext, function (configuration, compressionWorker, initialViewOptions) {
|
|
36
36
|
if (configuration.storeContextsToLocal) {
|
|
37
37
|
storeContextManager(configuration, globalContextManager, RUM_STORAGE_KEY, CustomerDataType.GlobalContext);
|
|
38
38
|
storeContextManager(configuration, userContextManager, RUM_STORAGE_KEY, CustomerDataType.User);
|
|
39
39
|
}
|
|
40
|
-
customerDataTrackerManager.setCompressionStatus(
|
|
41
|
-
var startRumResult = startRumImpl(configuration, recorderApi, customerDataTrackerManager, getCommonContext, initialViewOptions,
|
|
42
|
-
return options.
|
|
40
|
+
customerDataTrackerManager.setCompressionStatus(compressionWorker ? CustomerDataCompressionStatus.Enabled : CustomerDataCompressionStatus.Disabled);
|
|
41
|
+
var startRumResult = startRumImpl(configuration, recorderApi, customerDataTrackerManager, getCommonContext, initialViewOptions, compressionWorker && options.createCompressionEncoder ? function (streamId) {
|
|
42
|
+
return options.createCompressionEncoder(compressionWorker, streamId);
|
|
43
43
|
} : createIdentityEncoder, resourceTrackerManager);
|
|
44
|
-
recorderApi.onRumStart(startRumResult.lifeCycle, configuration, startRumResult.session, startRumResult.viewContexts,
|
|
44
|
+
recorderApi.onRumStart(startRumResult.lifeCycle, configuration, startRumResult.session, startRumResult.viewContexts, compressionWorker);
|
|
45
45
|
strategy = createPostStartStrategy(strategy, startRumResult);
|
|
46
46
|
return startRumResult;
|
|
47
47
|
});
|
|
@@ -57,7 +57,8 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
57
57
|
feature: 'start-view'
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
|
-
var
|
|
60
|
+
var recorderPublicApi = options.makeRecorderPublicApi ? options.makeRecorderPublicApi(recorderApi) : {};
|
|
61
|
+
var rumPublicApi = makePublicApi(assign({
|
|
61
62
|
init: monitor(function (initConfiguration) {
|
|
62
63
|
strategy.init(initConfiguration);
|
|
63
64
|
}),
|
|
@@ -246,56 +247,6 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
246
247
|
feature: 'set-forced-session'
|
|
247
248
|
});
|
|
248
249
|
}),
|
|
249
|
-
startSessionReplayRecording: monitor(function (options) {
|
|
250
|
-
recorderApi.start(options);
|
|
251
|
-
addTelemetryUsage({
|
|
252
|
-
feature: 'start-session-replay-recording',
|
|
253
|
-
force: options && options.force
|
|
254
|
-
});
|
|
255
|
-
}),
|
|
256
|
-
isRecording: monitor(function () {
|
|
257
|
-
return recorderApi.isRecording();
|
|
258
|
-
}),
|
|
259
|
-
stopSessionReplayRecording: monitor(recorderApi.stop),
|
|
260
|
-
takeSubsequentFullSnapshot: monitor(recorderApi.takeSubsequentFullSnapshot),
|
|
261
|
-
snapshotCanvas: monitor(function (canvas, options) {
|
|
262
|
-
return recorderApi.snapshotCanvas(canvas, options);
|
|
263
|
-
}),
|
|
264
|
-
getSerializedNodeIdForDebug: monitor(function (node) {
|
|
265
|
-
return recorderApi.getSerializedNodeIdForDebug(node);
|
|
266
|
-
}),
|
|
267
|
-
getLastAutoCanvasSnapshotResultForDebug: monitor(function () {
|
|
268
|
-
return recorderApi.getLastAutoCanvasSnapshotResultForDebug();
|
|
269
|
-
}),
|
|
270
|
-
getAutoCanvasSnapshotDebugHistoryForDebug: monitor(function () {
|
|
271
|
-
return recorderApi.getAutoCanvasSnapshotDebugHistoryForDebug();
|
|
272
|
-
}),
|
|
273
|
-
getLastCanvasMutationForDebug: monitor(function () {
|
|
274
|
-
return recorderApi.getLastCanvasMutationForDebug();
|
|
275
|
-
}),
|
|
276
|
-
getCanvasMutationHistoryForDebug: monitor(function () {
|
|
277
|
-
return recorderApi.getCanvasMutationHistoryForDebug();
|
|
278
|
-
}),
|
|
279
|
-
getLastDomMutationForDebug: monitor(function () {
|
|
280
|
-
return recorderApi.getLastDomMutationForDebug();
|
|
281
|
-
}),
|
|
282
|
-
getDomMutationHistoryForDebug: monitor(function () {
|
|
283
|
-
return recorderApi.getDomMutationHistoryForDebug();
|
|
284
|
-
}),
|
|
285
|
-
getLastReplaySegmentFlushForDebug: monitor(function () {
|
|
286
|
-
return recorderApi.getLastReplaySegmentFlushForDebug();
|
|
287
|
-
}),
|
|
288
|
-
getReplaySegmentFlushHistoryForDebug: monitor(function () {
|
|
289
|
-
return recorderApi.getReplaySegmentFlushHistoryForDebug();
|
|
290
|
-
}),
|
|
291
|
-
getReplayPerformanceForDebug: monitor(function () {
|
|
292
|
-
return recorderApi.getReplayPerformanceForDebug();
|
|
293
|
-
}),
|
|
294
|
-
flushReplayMutationsForDebug: monitor(function () {
|
|
295
|
-
if (recorderApi.flushReplayMutationsForDebug) {
|
|
296
|
-
recorderApi.flushReplayMutationsForDebug();
|
|
297
|
-
}
|
|
298
|
-
}),
|
|
299
250
|
createResourceTrackerId: monitor(function () {
|
|
300
251
|
return resourceTrackerManager.createTrackerId();
|
|
301
252
|
}),
|
|
@@ -311,7 +262,7 @@ export function makeRumPublicApi(startRumImpl, recorderApi, options) {
|
|
|
311
262
|
getResource: monitor(function (trackerId) {
|
|
312
263
|
return resourceTrackerManager.getResource(trackerId);
|
|
313
264
|
})
|
|
314
|
-
});
|
|
265
|
+
}, recorderPublicApi));
|
|
315
266
|
return rumPublicApi;
|
|
316
267
|
}
|
|
317
268
|
function createPostStartStrategy(preStartStrategy, startRumResult) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rumPublicApi.js","names":["makePublicApi","createContextManager","CustomerDataType","clocksNow","ActionType","ResourceType","deepClone","createHandlingStack","sanitizeUser","checkUser","callMonitored","assign","monitor","storeContextManager","createIdentityEncoder","addTelemetryUsage","sanitize","createCustomerDataTrackerManager","CustomerDataCompressionStatus","displayAlreadyInitializedError","getType","buildCommonContext","createPreStartStrategy","createResourceTrackerManager","RUM_STORAGE_KEY","makeRumPublicApi","startRumImpl","recorderApi","options","undefined","customerDataTrackerManager","Unknown","resourceTrackerManager","globalContextManager","customerDataTracker","getOrCreateTracker","GlobalContext","userContextManager","User","propertiesConfig","id","type","name","email","getCommonContext","strategy","configuration","deflateWorker","initialViewOptions","storeContextsToLocal","setCompressionStatus","Enabled","Disabled","startRumResult","createDeflateEncoder","streamId","onRumStart","lifeCycle","session","viewContexts","createPostStartStrategy","startView","sanitizedOptions","_typeof","context","View","updateCustomerData","feature","rumPublicApi","init","initConfiguration","setViewName","setViewContext","setViewContextProperty","key","value","getViewContext","addRumGlobalContext","setContextProperty","setGlobalContextProperty","removeRumGlobalContext","removeContextProperty","removeGlobalContextProperty","getRumGlobalContext","getContext","getGlobalContext","setRumGlobalContext","setContext","setGlobalContext","clearGlobalContext","clearContext","getInitConfiguration","getRemoteConfiguration","callback","getInternalContext","startTime","addDebugSession","clearDebugSession","getDebugSession","addResource","handlingStack","startClocks","CUSTOM","addTypeAction","sourceType","addAction","addError","error","addTiming","time","setUser","newUser","getUser","setUserProperty","property","sanitizedProperty","removeUserProperty","removeUser","clearUser","stopSession","setForcedSession","startSessionReplayRecording","start","force","isRecording","stopSessionReplayRecording","stop","takeSubsequentFullSnapshot","snapshotCanvas","canvas","getSerializedNodeIdForDebug","node","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","getReplayPerformanceForDebug","flushReplayMutationsForDebug","createResourceTrackerId","createTrackerId","setResourceContext","trackerId","appendResourceContext","finishResource","getResource","preStartStrategy"],"sources":["../../src/boot/rumPublicApi.js"],"sourcesContent":["import {\n makePublicApi,\n createContextManager,\n CustomerDataType,\n clocksNow,\n ActionType,\n ResourceType,\n deepClone,\n createHandlingStack,\n sanitizeUser,\n checkUser,\n callMonitored,\n assign,\n monitor,\n storeContextManager,\n createIdentityEncoder,\n addTelemetryUsage,\n sanitize,\n createCustomerDataTrackerManager,\n CustomerDataCompressionStatus,\n displayAlreadyInitializedError,\n getType\n} from '@cloudcare/browser-core'\nimport { buildCommonContext } from '../domain/contexts/commonContext'\nimport { createPreStartStrategy } from './perStartRum'\nimport { createResourceTrackerManager } from '../domain/rumEventsCollection/resource/resourceTrackerManager'\nvar RUM_STORAGE_KEY = 'rum'\nexport function makeRumPublicApi(startRumImpl, recorderApi, options) {\n if (options === undefined) {\n options = {}\n }\n const customerDataTrackerManager = createCustomerDataTrackerManager(\n CustomerDataCompressionStatus.Unknown\n )\n const resourceTrackerManager = createResourceTrackerManager()\n const globalContextManager = createContextManager('global', {\n customerDataTracker: customerDataTrackerManager.getOrCreateTracker(\n CustomerDataType.GlobalContext\n )\n })\n const userContextManager = createContextManager('user', {\n customerDataTracker: customerDataTrackerManager.getOrCreateTracker(\n CustomerDataType.User\n ),\n propertiesConfig: {\n id: { type: 'string' },\n name: { type: 'string' },\n email: { type: 'string' }\n }\n })\n function getCommonContext() {\n return buildCommonContext(\n globalContextManager,\n userContextManager,\n recorderApi\n )\n }\n let strategy = createPreStartStrategy(\n assign({}, options, {\n resourceTrackerManager: resourceTrackerManager\n }),\n getCommonContext,\n function (configuration, deflateWorker, initialViewOptions) {\n if (configuration.storeContextsToLocal) {\n storeContextManager(\n configuration,\n globalContextManager,\n RUM_STORAGE_KEY,\n CustomerDataType.GlobalContext\n )\n storeContextManager(\n configuration,\n userContextManager,\n RUM_STORAGE_KEY,\n CustomerDataType.User\n )\n }\n customerDataTrackerManager.setCompressionStatus(\n deflateWorker\n ? CustomerDataCompressionStatus.Enabled\n : CustomerDataCompressionStatus.Disabled\n )\n var startRumResult = startRumImpl(\n configuration,\n recorderApi,\n customerDataTrackerManager,\n getCommonContext,\n initialViewOptions,\n deflateWorker && options.createDeflateEncoder\n ? function (streamId) {\n return options.createDeflateEncoder(deflateWorker, streamId)\n }\n : createIdentityEncoder,\n resourceTrackerManager\n )\n recorderApi.onRumStart(\n startRumResult.lifeCycle,\n configuration,\n startRumResult.session,\n startRumResult.viewContexts,\n deflateWorker\n )\n\n strategy = createPostStartStrategy(strategy, startRumResult)\n\n return startRumResult\n }\n )\n\n const startView = monitor(function (options) {\n const sanitizedOptions =\n typeof options === 'object' ? options : { name: options }\n strategy.startView(sanitizedOptions)\n if (sanitizedOptions.context) {\n customerDataTrackerManager\n .getOrCreateTracker(CustomerDataType.View)\n .updateCustomerData(sanitizedOptions.context)\n }\n addTelemetryUsage({ feature: 'start-view' })\n })\n\n var rumPublicApi = makePublicApi({\n init: monitor(function (initConfiguration) {\n strategy.init(initConfiguration)\n }),\n setViewName: monitor((name) => {\n strategy.setViewName(name)\n addTelemetryUsage({ feature: 'set-view-name' })\n }),\n\n setViewContext: monitor((context) => {\n strategy.setViewContext(context)\n addTelemetryUsage({ feature: 'set-view-context' })\n }),\n\n setViewContextProperty: monitor((key, value) => {\n strategy.setViewContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-view-context-property' })\n }),\n\n getViewContext: monitor(() => {\n addTelemetryUsage({ feature: 'set-view-context-property' })\n return strategy.getViewContext()\n }),\n /** @deprecated: use setGlobalContextProperty instead */\n addRumGlobalContext: monitor(function (key, value) {\n globalContextManager.setContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n setGlobalContextProperty: monitor(function (key, value) {\n globalContextManager.setContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n\n /** @deprecated: use removeGlobalContextProperty instead */\n removeRumGlobalContext: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n removeGlobalContextProperty: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n\n /** @deprecated: use getGlobalContext instead */\n getRumGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n getGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n\n /** @deprecated: use setGlobalContext instead */\n setRumGlobalContext: monitor(function (context) {\n globalContextManager.setContext(context)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n setGlobalContext: monitor(function (context) {\n globalContextManager.setContext(context)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n\n clearGlobalContext: monitor(function () {\n return globalContextManager.clearContext()\n }),\n\n getInitConfiguration: monitor(function () {\n return deepClone(strategy.initConfiguration)\n }),\n getRemoteConfiguration: monitor(function (callback) {\n return strategy.getRemoteConfiguration(callback)\n }),\n getInternalContext: monitor(function (startTime) {\n return strategy.getInternalContext(startTime)\n }),\n addDebugSession: monitor(function (id) {}),\n clearDebugSession: monitor(function () {}),\n getDebugSession: monitor(function () {}),\n addResource: monitor(function (context) {\n const handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addResource({\n context: sanitize(context),\n startClocks: clocksNow(),\n type: ResourceType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-resource' })\n })\n }),\n addTypeAction: monitor(function (name, type, context) {\n const handlingStack = createHandlingStack()\n\n callMonitored(function () {\n const sourceType = sanitize(type)\n strategy.addAction({\n name: sanitize(name),\n context: sanitize(context),\n startClocks: clocksNow(),\n type:\n getType(sourceType) === 'string' ? sourceType : ActionType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-type-action' })\n })\n }),\n addAction: monitor(function (name, context) {\n const handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addAction({\n name: sanitize(name),\n context: sanitize(context),\n startClocks: clocksNow(),\n type: ActionType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-action' })\n })\n }),\n addError: monitor(function (error, context) {\n var handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addError({\n error, // Do not sanitize error here, it is needed unserialized by computeRawError()\n handlingStack,\n context: sanitize(context),\n startClocks: clocksNow()\n })\n addTelemetryUsage({ feature: 'add-error' })\n })\n }),\n addTiming: monitor(function (name, time) {\n strategy.addTiming(sanitize(name), time)\n }),\n setUser: monitor(function (newUser) {\n if (checkUser(newUser)) {\n userContextManager.setContext(sanitizeUser(newUser))\n }\n addTelemetryUsage({ feature: 'set-user' })\n }),\n getUser: monitor(function () {\n return userContextManager.getContext()\n }),\n setUserProperty: monitor(function (key, property) {\n var newUser = {}\n newUser[key] = property\n var sanitizedProperty = sanitizeUser(newUser)[key]\n userContextManager.setContextProperty(key, sanitizedProperty)\n addTelemetryUsage({ feature: 'set-user' })\n }),\n removeUserProperty: monitor(function (key) {\n return userContextManager.removeContextProperty(key)\n }),\n\n /** @deprecated: renamed to clearUser */\n removeUser: monitor(function () {\n return userContextManager.clearContext()\n }),\n clearUser: monitor(function () {\n return userContextManager.clearContext()\n }),\n startView: startView,\n stopSession: monitor(function () {\n strategy.stopSession()\n addTelemetryUsage({ feature: 'stop-session' })\n }),\n setForcedSession: monitor(function () {\n strategy.setForcedSession()\n addTelemetryUsage({ feature: 'set-forced-session' })\n }),\n startSessionReplayRecording: monitor(function (options) {\n recorderApi.start(options)\n addTelemetryUsage({\n feature: 'start-session-replay-recording',\n force: options && options.force\n })\n }),\n isRecording: monitor(function () {\n return recorderApi.isRecording()\n }),\n stopSessionReplayRecording: monitor(recorderApi.stop),\n takeSubsequentFullSnapshot: monitor(recorderApi.takeSubsequentFullSnapshot),\n snapshotCanvas: monitor(function (canvas, options) {\n return recorderApi.snapshotCanvas(canvas, options)\n }),\n getSerializedNodeIdForDebug: monitor(function (node) {\n return recorderApi.getSerializedNodeIdForDebug(node)\n }),\n getLastAutoCanvasSnapshotResultForDebug: monitor(function () {\n return recorderApi.getLastAutoCanvasSnapshotResultForDebug()\n }),\n getAutoCanvasSnapshotDebugHistoryForDebug: monitor(function () {\n return recorderApi.getAutoCanvasSnapshotDebugHistoryForDebug()\n }),\n getLastCanvasMutationForDebug: monitor(function () {\n return recorderApi.getLastCanvasMutationForDebug()\n }),\n getCanvasMutationHistoryForDebug: monitor(function () {\n return recorderApi.getCanvasMutationHistoryForDebug()\n }),\n getLastDomMutationForDebug: monitor(function () {\n return recorderApi.getLastDomMutationForDebug()\n }),\n getDomMutationHistoryForDebug: monitor(function () {\n return recorderApi.getDomMutationHistoryForDebug()\n }),\n getLastReplaySegmentFlushForDebug: monitor(function () {\n return recorderApi.getLastReplaySegmentFlushForDebug()\n }),\n getReplaySegmentFlushHistoryForDebug: monitor(function () {\n return recorderApi.getReplaySegmentFlushHistoryForDebug()\n }),\n getReplayPerformanceForDebug: monitor(function () {\n return recorderApi.getReplayPerformanceForDebug()\n }),\n flushReplayMutationsForDebug: monitor(function () {\n if (recorderApi.flushReplayMutationsForDebug) {\n recorderApi.flushReplayMutationsForDebug()\n }\n }),\n createResourceTrackerId: monitor(function () {\n return resourceTrackerManager.createTrackerId()\n }),\n setResourceContext: monitor(function (trackerId, context) {\n return resourceTrackerManager.setResourceContext(\n trackerId,\n sanitize(context)\n )\n }),\n appendResourceContext: monitor(function (trackerId, context) {\n return resourceTrackerManager.appendResourceContext(\n trackerId,\n sanitize(context)\n )\n }),\n finishResource: monitor(function (trackerId) {\n return resourceTrackerManager.finishResource(trackerId)\n }),\n getResource: monitor(function (trackerId) {\n return resourceTrackerManager.getResource(trackerId)\n })\n })\n return rumPublicApi\n}\nfunction createPostStartStrategy(preStartStrategy, startRumResult) {\n return assign(\n {\n init: function (initConfiguration) {\n displayAlreadyInitializedError('DATAFLUX_RUM', initConfiguration)\n },\n initConfiguration: preStartStrategy.getInitConfiguration(),\n getRemoteConfiguration: function (callback) {\n preStartStrategy.getRemoteConfiguration(callback)\n }\n },\n startRumResult\n )\n}\n"],"mappings":";AAAA,SACEA,aAAa,EACbC,oBAAoB,EACpBC,gBAAgB,EAChBC,SAAS,EACTC,UAAU,EACVC,YAAY,EACZC,SAAS,EACTC,mBAAmB,EACnBC,YAAY,EACZC,SAAS,EACTC,aAAa,EACbC,MAAM,EACNC,OAAO,EACPC,mBAAmB,EACnBC,qBAAqB,EACrBC,iBAAiB,EACjBC,QAAQ,EACRC,gCAAgC,EAChCC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,OAAO,QACF,yBAAyB;AAChC,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,sBAAsB,QAAQ,eAAe;AACtD,SAASC,4BAA4B,QAAQ,+DAA+D;AAC5G,IAAIC,eAAe,GAAG,KAAK;AAC3B,OAAO,SAASC,gBAAgBA,CAACC,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAE;EACnE,IAAIA,OAAO,KAAKC,SAAS,EAAE;IACzBD,OAAO,GAAG,CAAC,CAAC;EACd;EACA,IAAME,0BAA0B,GAAGb,gCAAgC,CACjEC,6BAA6B,CAACa,OAChC,CAAC;EACD,IAAMC,sBAAsB,GAAGT,4BAA4B,CAAC,CAAC;EAC7D,IAAMU,oBAAoB,GAAGhC,oBAAoB,CAAC,QAAQ,EAAE;IAC1DiC,mBAAmB,EAAEJ,0BAA0B,CAACK,kBAAkB,CAChEjC,gBAAgB,CAACkC,aACnB;EACF,CAAC,CAAC;EACF,IAAMC,kBAAkB,GAAGpC,oBAAoB,CAAC,MAAM,EAAE;IACtDiC,m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,CAACyF,gBAAgB,EAAEhG,cAAc,EAAE;EACjE,OAAO1C,MAAM,CACX;IACE0D,IAAI,EAAE,SAANA,IAAIA,CAAYC,iBAAiB,EAAE;MACjCnD,8BAA8B,CAAC,cAAc,EAAEmD,iBAAiB,CAAC;IACnE,CAAC;IACDA,iBAAiB,EAAE+E,gBAAgB,CAAC1D,oBAAoB,CAAC,CAAC;IAC1DC,sBAAsB,EAAE,SAAxBA,sBAAsBA,CAAYC,QAAQ,EAAE;MAC1CwD,gBAAgB,CAACzD,sBAAsB,CAACC,QAAQ,CAAC;IACnD;EACF,CAAC,EACDxC,cACF,CAAC;AACH","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"rumPublicApi.js","names":["makePublicApi","createContextManager","CustomerDataType","clocksNow","ActionType","ResourceType","deepClone","createHandlingStack","sanitizeUser","checkUser","callMonitored","assign","monitor","storeContextManager","createIdentityEncoder","addTelemetryUsage","sanitize","createCustomerDataTrackerManager","CustomerDataCompressionStatus","displayAlreadyInitializedError","getType","buildCommonContext","createPreStartStrategy","createResourceTrackerManager","RUM_STORAGE_KEY","makeRumPublicApi","startRumImpl","recorderApi","options","undefined","customerDataTrackerManager","Unknown","resourceTrackerManager","globalContextManager","customerDataTracker","getOrCreateTracker","GlobalContext","userContextManager","User","propertiesConfig","id","type","name","email","getCommonContext","strategy","configuration","compressionWorker","initialViewOptions","storeContextsToLocal","setCompressionStatus","Enabled","Disabled","startRumResult","createCompressionEncoder","streamId","onRumStart","lifeCycle","session","viewContexts","createPostStartStrategy","startView","sanitizedOptions","_typeof","context","View","updateCustomerData","feature","recorderPublicApi","makeRecorderPublicApi","rumPublicApi","init","initConfiguration","setViewName","setViewContext","setViewContextProperty","key","value","getViewContext","addRumGlobalContext","setContextProperty","setGlobalContextProperty","removeRumGlobalContext","removeContextProperty","removeGlobalContextProperty","getRumGlobalContext","getContext","getGlobalContext","setRumGlobalContext","setContext","setGlobalContext","clearGlobalContext","clearContext","getInitConfiguration","getRemoteConfiguration","callback","getInternalContext","startTime","addDebugSession","clearDebugSession","getDebugSession","addResource","handlingStack","startClocks","CUSTOM","addTypeAction","sourceType","addAction","addError","error","addTiming","time","setUser","newUser","getUser","setUserProperty","property","sanitizedProperty","removeUserProperty","removeUser","clearUser","stopSession","setForcedSession","createResourceTrackerId","createTrackerId","setResourceContext","trackerId","appendResourceContext","finishResource","getResource","preStartStrategy"],"sources":["../../src/boot/rumPublicApi.js"],"sourcesContent":["import {\n makePublicApi,\n createContextManager,\n CustomerDataType,\n clocksNow,\n ActionType,\n ResourceType,\n deepClone,\n createHandlingStack,\n sanitizeUser,\n checkUser,\n callMonitored,\n assign,\n monitor,\n storeContextManager,\n createIdentityEncoder,\n addTelemetryUsage,\n sanitize,\n createCustomerDataTrackerManager,\n CustomerDataCompressionStatus,\n displayAlreadyInitializedError,\n getType\n} from '@cloudcare/browser-core'\nimport { buildCommonContext } from '../domain/contexts/commonContext'\nimport { createPreStartStrategy } from './perStartRum'\nimport { createResourceTrackerManager } from '../domain/rumEventsCollection/resource/resourceTrackerManager'\nvar RUM_STORAGE_KEY = 'rum'\nexport function makeRumPublicApi(startRumImpl, recorderApi, options) {\n if (options === undefined) {\n options = {}\n }\n const customerDataTrackerManager = createCustomerDataTrackerManager(\n CustomerDataCompressionStatus.Unknown\n )\n const resourceTrackerManager = createResourceTrackerManager()\n const globalContextManager = createContextManager('global', {\n customerDataTracker: customerDataTrackerManager.getOrCreateTracker(\n CustomerDataType.GlobalContext\n )\n })\n const userContextManager = createContextManager('user', {\n customerDataTracker: customerDataTrackerManager.getOrCreateTracker(\n CustomerDataType.User\n ),\n propertiesConfig: {\n id: { type: 'string' },\n name: { type: 'string' },\n email: { type: 'string' }\n }\n })\n function getCommonContext() {\n return buildCommonContext(\n globalContextManager,\n userContextManager,\n recorderApi\n )\n }\n let strategy = createPreStartStrategy(\n assign({}, options, {\n resourceTrackerManager: resourceTrackerManager\n }),\n getCommonContext,\n function (configuration, compressionWorker, initialViewOptions) {\n if (configuration.storeContextsToLocal) {\n storeContextManager(\n configuration,\n globalContextManager,\n RUM_STORAGE_KEY,\n CustomerDataType.GlobalContext\n )\n storeContextManager(\n configuration,\n userContextManager,\n RUM_STORAGE_KEY,\n CustomerDataType.User\n )\n }\n customerDataTrackerManager.setCompressionStatus(\n compressionWorker\n ? CustomerDataCompressionStatus.Enabled\n : CustomerDataCompressionStatus.Disabled\n )\n var startRumResult = startRumImpl(\n configuration,\n recorderApi,\n customerDataTrackerManager,\n getCommonContext,\n initialViewOptions,\n compressionWorker && options.createCompressionEncoder\n ? function (streamId) {\n return options.createCompressionEncoder(\n compressionWorker,\n streamId\n )\n }\n : createIdentityEncoder,\n resourceTrackerManager\n )\n recorderApi.onRumStart(\n startRumResult.lifeCycle,\n configuration,\n startRumResult.session,\n startRumResult.viewContexts,\n compressionWorker\n )\n\n strategy = createPostStartStrategy(strategy, startRumResult)\n\n return startRumResult\n }\n )\n\n const startView = monitor(function (options) {\n const sanitizedOptions =\n typeof options === 'object' ? options : { name: options }\n strategy.startView(sanitizedOptions)\n if (sanitizedOptions.context) {\n customerDataTrackerManager\n .getOrCreateTracker(CustomerDataType.View)\n .updateCustomerData(sanitizedOptions.context)\n }\n addTelemetryUsage({ feature: 'start-view' })\n })\n\n const recorderPublicApi = options.makeRecorderPublicApi\n ? options.makeRecorderPublicApi(recorderApi)\n : {}\n\n var rumPublicApi = makePublicApi(assign({\n init: monitor(function (initConfiguration) {\n strategy.init(initConfiguration)\n }),\n setViewName: monitor((name) => {\n strategy.setViewName(name)\n addTelemetryUsage({ feature: 'set-view-name' })\n }),\n\n setViewContext: monitor((context) => {\n strategy.setViewContext(context)\n addTelemetryUsage({ feature: 'set-view-context' })\n }),\n\n setViewContextProperty: monitor((key, value) => {\n strategy.setViewContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-view-context-property' })\n }),\n\n getViewContext: monitor(() => {\n addTelemetryUsage({ feature: 'set-view-context-property' })\n return strategy.getViewContext()\n }),\n /** @deprecated: use setGlobalContextProperty instead */\n addRumGlobalContext: monitor(function (key, value) {\n globalContextManager.setContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n setGlobalContextProperty: monitor(function (key, value) {\n globalContextManager.setContextProperty(key, value)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n\n /** @deprecated: use removeGlobalContextProperty instead */\n removeRumGlobalContext: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n removeGlobalContextProperty: monitor(function (key) {\n return globalContextManager.removeContextProperty(key)\n }),\n\n /** @deprecated: use getGlobalContext instead */\n getRumGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n getGlobalContext: monitor(function () {\n return globalContextManager.getContext()\n }),\n\n /** @deprecated: use setGlobalContext instead */\n setRumGlobalContext: monitor(function (context) {\n globalContextManager.setContext(context)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n setGlobalContext: monitor(function (context) {\n globalContextManager.setContext(context)\n addTelemetryUsage({ feature: 'set-global-context' })\n }),\n\n clearGlobalContext: monitor(function () {\n return globalContextManager.clearContext()\n }),\n\n getInitConfiguration: monitor(function () {\n return deepClone(strategy.initConfiguration)\n }),\n getRemoteConfiguration: monitor(function (callback) {\n return strategy.getRemoteConfiguration(callback)\n }),\n getInternalContext: monitor(function (startTime) {\n return strategy.getInternalContext(startTime)\n }),\n addDebugSession: monitor(function (id) {}),\n clearDebugSession: monitor(function () {}),\n getDebugSession: monitor(function () {}),\n addResource: monitor(function (context) {\n const handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addResource({\n context: sanitize(context),\n startClocks: clocksNow(),\n type: ResourceType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-resource' })\n })\n }),\n addTypeAction: monitor(function (name, type, context) {\n const handlingStack = createHandlingStack()\n\n callMonitored(function () {\n const sourceType = sanitize(type)\n strategy.addAction({\n name: sanitize(name),\n context: sanitize(context),\n startClocks: clocksNow(),\n type:\n getType(sourceType) === 'string' ? sourceType : ActionType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-type-action' })\n })\n }),\n addAction: monitor(function (name, context) {\n const handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addAction({\n name: sanitize(name),\n context: sanitize(context),\n startClocks: clocksNow(),\n type: ActionType.CUSTOM,\n handlingStack: handlingStack\n })\n addTelemetryUsage({ feature: 'add-action' })\n })\n }),\n addError: monitor(function (error, context) {\n var handlingStack = createHandlingStack()\n callMonitored(function () {\n strategy.addError({\n error, // Do not sanitize error here, it is needed unserialized by computeRawError()\n handlingStack,\n context: sanitize(context),\n startClocks: clocksNow()\n })\n addTelemetryUsage({ feature: 'add-error' })\n })\n }),\n addTiming: monitor(function (name, time) {\n strategy.addTiming(sanitize(name), time)\n }),\n setUser: monitor(function (newUser) {\n if (checkUser(newUser)) {\n userContextManager.setContext(sanitizeUser(newUser))\n }\n addTelemetryUsage({ feature: 'set-user' })\n }),\n getUser: monitor(function () {\n return userContextManager.getContext()\n }),\n setUserProperty: monitor(function (key, property) {\n var newUser = {}\n newUser[key] = property\n var sanitizedProperty = sanitizeUser(newUser)[key]\n userContextManager.setContextProperty(key, sanitizedProperty)\n addTelemetryUsage({ feature: 'set-user' })\n }),\n removeUserProperty: monitor(function (key) {\n return userContextManager.removeContextProperty(key)\n }),\n\n /** @deprecated: renamed to clearUser */\n removeUser: monitor(function () {\n return userContextManager.clearContext()\n }),\n clearUser: monitor(function () {\n return userContextManager.clearContext()\n }),\n startView: startView,\n stopSession: monitor(function () {\n strategy.stopSession()\n addTelemetryUsage({ feature: 'stop-session' })\n }),\n setForcedSession: monitor(function () {\n strategy.setForcedSession()\n addTelemetryUsage({ feature: 'set-forced-session' })\n }),\n createResourceTrackerId: monitor(function () {\n return resourceTrackerManager.createTrackerId()\n }),\n setResourceContext: monitor(function (trackerId, context) {\n return resourceTrackerManager.setResourceContext(\n trackerId,\n sanitize(context)\n )\n }),\n appendResourceContext: monitor(function (trackerId, context) {\n return resourceTrackerManager.appendResourceContext(\n trackerId,\n sanitize(context)\n )\n }),\n finishResource: monitor(function (trackerId) {\n return resourceTrackerManager.finishResource(trackerId)\n }),\n getResource: monitor(function (trackerId) {\n return resourceTrackerManager.getResource(trackerId)\n })\n }, recorderPublicApi))\n return rumPublicApi\n}\nfunction createPostStartStrategy(preStartStrategy, startRumResult) {\n return assign(\n {\n init: function (initConfiguration) {\n displayAlreadyInitializedError('DATAFLUX_RUM', initConfiguration)\n },\n initConfiguration: preStartStrategy.getInitConfiguration(),\n getRemoteConfiguration: function (callback) {\n preStartStrategy.getRemoteConfiguration(callback)\n }\n },\n startRumResult\n )\n}\n"],"mappings":";AAAA,SACEA,aAAa,EACbC,oBAAoB,EACpBC,gBAAgB,EAChBC,SAAS,EACTC,UAAU,EACVC,YAAY,EACZC,SAAS,EACTC,mBAAmB,EACnBC,YAAY,EACZC,SAAS,EACTC,aAAa,EACbC,MAAM,EACNC,OAAO,EACPC,mBAAmB,EACnBC,qBAAqB,EACrBC,iBAAiB,EACjBC,QAAQ,EACRC,gCAAgC,EAChCC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,OAAO,QACF,yBAAyB;AAChC,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,sBAAsB,QAAQ,eAAe;AACtD,SAASC,4BAA4B,QAAQ,+DAA+D;AAC5G,IAAIC,eAAe,GAAG,KAAK;AAC3B,OAAO,SAASC,gBAAgBA,CAACC,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAE;EACnE,IAAIA,OAAO,KAAKC,SAAS,EAAE;IACzBD,OAAO,GAAG,CAAC,CAAC;EACd;EACA,IAAME,0BAA0B,GAAGb,gCAAgC,CACjEC,6BAA6B,CAACa,OAChC,CAAC;EACD,IAAMC,sBAAsB,GAAGT,4BAA4B,CAAC,CAAC;EAC7D,IAAMU,oBAAoB,GAAGhC,oBAAoB,CAAC,QAAQ,EAAE;IAC1DiC,mBAAmB,EAAEJ,0BAA0B,CAACK,kB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