Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@datadog/browser-rum-core

Package Overview
Dependencies
Maintainers
1
Versions
182
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@datadog/browser-rum-core - npm Package Compare versions

Comparing version 3.6.13 to 3.7.0

cjs/transport/startRumEventBridge.d.ts

2

cjs/boot/buildEnv.js

@@ -6,4 +6,4 @@ "use strict";

buildMode: 'release',
sdkVersion: '3.6.13',
sdkVersion: '3.7.0',
};
//# sourceMappingURL=buildEnv.js.map

@@ -20,2 +20,3 @@ "use strict";

var batch_1 = require("../transport/batch");
var startRumEventBridge_1 = require("../transport/startRumEventBridge");
var urlContexts_1 = require("../domain/urlContexts");

@@ -31,3 +32,3 @@ var locationChangeObservable_1 = require("../browser/locationChangeObservable");

application_id: initConfiguration.applicationId,
}, parentContexts.findView(), getCommonContext().context);
}, parentContexts.findView(), { view: { name: null } });
});

@@ -59,3 +60,10 @@ var _a = startRumEventCollection(initConfiguration.applicationId, lifeCycle, configuration, location, session, locationChangeObservable, getCommonContext), parentContexts = _a.parentContexts, foregroundContexts = _a.foregroundContexts, urlContexts = _a.urlContexts;

var foregroundContexts = foregroundContexts_1.startForegroundContexts();
var batch = batch_1.startRumBatch(configuration, lifeCycle);
var stopBatch;
if (browser_core_1.isEventBridgePresent()) {
startRumEventBridge_1.startRumEventBridge(lifeCycle);
}
else {
;
(stopBatch = batch_1.startRumBatch(configuration, lifeCycle).stop);
}
assembly_1.startRumAssembly(applicationId, configuration, lifeCycle, session, parentContexts, urlContexts, getCommonContext);

@@ -69,3 +77,3 @@ return {

// could be replaced by stopping all the component when they will all have a stop method
batch.stop();
stopBatch === null || stopBatch === void 0 ? void 0 : stopBatch();
parentContexts.stop();

@@ -72,0 +80,0 @@ foregroundContexts.stop();

@@ -43,3 +43,3 @@ "use strict";

return {
getId: function () { return browser_core_1.generateUUID(); },
getId: function () { return '00000000-aaaa-0000-aaaa-000000000000'; },
isTracked: function () { return true; },

@@ -46,0 +46,0 @@ hasReplayPlan: function () { return true; },

import { Configuration } from '@datadog/browser-core';
import { LifeCycle } from '../domain/lifeCycle';
export declare function startRumBatch(configuration: Configuration, lifeCycle: LifeCycle): {
stop(): void;
stop: () => void;
};

@@ -18,5 +18,3 @@ "use strict";

return {
stop: function () {
batch.stop();
},
stop: function () { return batch.stop(); },
};

@@ -23,0 +21,0 @@ }

export var buildEnv = {
buildMode: 'release',
sdkVersion: '3.6.13',
sdkVersion: '3.7.0',
};
//# sourceMappingURL=buildEnv.js.map

@@ -17,2 +17,3 @@ import { combine, isEventBridgePresent } from '@datadog/browser-core';

import { startRumBatch } from '../transport/batch';
import { startRumEventBridge } from '../transport/startRumEventBridge';
import { startUrlContexts } from '../domain/urlContexts';

@@ -28,3 +29,3 @@ import { createLocationChangeObservable } from '../browser/locationChangeObservable';

application_id: initConfiguration.applicationId,
}, parentContexts.findView(), getCommonContext().context);
}, parentContexts.findView(), { view: { name: null } });
});

@@ -55,3 +56,10 @@ var _a = startRumEventCollection(initConfiguration.applicationId, lifeCycle, configuration, location, session, locationChangeObservable, getCommonContext), parentContexts = _a.parentContexts, foregroundContexts = _a.foregroundContexts, urlContexts = _a.urlContexts;

var foregroundContexts = startForegroundContexts();
var batch = startRumBatch(configuration, lifeCycle);
var stopBatch;
if (isEventBridgePresent()) {
startRumEventBridge(lifeCycle);
}
else {
;
(stopBatch = startRumBatch(configuration, lifeCycle).stop);
}
startRumAssembly(applicationId, configuration, lifeCycle, session, parentContexts, urlContexts, getCommonContext);

@@ -65,3 +73,3 @@ return {

// could be replaced by stopping all the component when they will all have a stop method
batch.stop();
stopBatch === null || stopBatch === void 0 ? void 0 : stopBatch();
parentContexts.stop();

@@ -68,0 +76,0 @@ foregroundContexts.stop();

@@ -1,2 +0,2 @@

import { generateUUID, performDraw, startSessionManagement } from '@datadog/browser-core';
import { performDraw, startSessionManagement } from '@datadog/browser-core';
import { LifeCycleEventType } from './lifeCycle';

@@ -39,3 +39,3 @@ export var RUM_SESSION_KEY = 'rum';

return {
getId: function () { return generateUUID(); },
getId: function () { return '00000000-aaaa-0000-aaaa-000000000000'; },
isTracked: function () { return true; },

@@ -42,0 +42,0 @@ hasReplayPlan: function () { return true; },

import { Configuration } from '@datadog/browser-core';
import { LifeCycle } from '../domain/lifeCycle';
export declare function startRumBatch(configuration: Configuration, lifeCycle: LifeCycle): {
stop(): void;
stop: () => void;
};

@@ -15,5 +15,3 @@ import { Batch, combine, HttpRequest } from '@datadog/browser-core';

return {
stop: function () {
batch.stop();
},
stop: function () { return batch.stop(); },
};

@@ -20,0 +18,0 @@ }

{
"name": "@datadog/browser-rum-core",
"version": "3.6.13",
"version": "3.7.0",
"license": "Apache-2.0",

@@ -15,3 +15,3 @@ "main": "cjs/index.js",

"dependencies": {
"@datadog/browser-core": "3.6.13",
"@datadog/browser-core": "3.7.0",
"tslib": "^1.10.0"

@@ -27,3 +27,3 @@ },

},
"gitHead": "1b2e798a9ae3d018049a064a03e37f31e049b000"
"gitHead": "e0138aa0a04098f2091b19057717d30a009dbdbb"
}

@@ -11,3 +11,3 @@ import {

} from '@datadog/browser-core'
import { initDatadogEventBridgeStub, deleteDatadogEventBridgeStub } from '../../../core/test/specHelper'
import { initEventBridgeStub, deleteEventBridgeStub } from '../../../core/test/specHelper'
import { noopRecorderApi, setup, TestSetupBuilder } from '../../test/specHelper'

@@ -125,3 +125,3 @@ import { ActionType } from '../rawRumEvent.types'

updateExperimentalFeatures(['event-bridge'])
initDatadogEventBridgeStub()
initEventBridgeStub()
})

@@ -131,3 +131,3 @@

resetExperimentalFeatures()
deleteDatadogEventBridgeStub()
deleteEventBridgeStub()
})

@@ -134,0 +134,0 @@

@@ -1,6 +0,15 @@

import { RelativeTime, Configuration, Observable, noop, relativeNow, isIE } from '@datadog/browser-core'
import {
RelativeTime,
Configuration,
Observable,
noop,
relativeNow,
isIE,
resetExperimentalFeatures,
updateExperimentalFeatures,
Context,
} from '@datadog/browser-core'
import { createRumSessionMock, RumSessionMock } from '../../test/mockRumSession'
import { noopRecorderApi, setup, TestSetupBuilder } from '../../test/specHelper'
import { RumPerformanceNavigationTiming, RumPerformanceEntry } from '../browser/performanceCollection'
import { LifeCycle, LifeCycleEventType } from '../domain/lifeCycle'

@@ -13,2 +22,3 @@ import { SESSION_KEEP_ALIVE_INTERVAL, THROTTLE_VIEW_UPDATE_PERIOD } from '../domain/rumEventsCollection/view/trackViews'

import { RumSession } from '..'
import { initEventBridgeStub, deleteEventBridgeStub } from '../../../core/test/specHelper'
import { startRumEventCollection } from './startRum'

@@ -299,1 +309,42 @@

})
describe('startRumEventCollection', () => {
let setupBuilder: TestSetupBuilder
let sendSpy: jasmine.Spy<(msg: string) => void>
beforeEach(() => {
updateExperimentalFeatures(['event-bridge'])
const eventBridgeStub = initEventBridgeStub()
sendSpy = spyOn(eventBridgeStub, 'send')
setupBuilder = setupBuilder = setup().beforeBuild(
({ applicationId, location, lifeCycle, configuration, session, locationChangeObservable }) =>
startRumEventCollection(
applicationId,
lifeCycle,
configuration,
location,
session,
locationChangeObservable,
() => ({
context: {},
user: {},
})
)
)
})
afterEach(() => {
resetExperimentalFeatures()
deleteEventBridgeStub()
setupBuilder.cleanup()
})
it('should send bridge event when bridge is present', () => {
const { lifeCycle } = setupBuilder.build()
const collectedRumEvent = {} as RumEvent & Context
lifeCycle.notify(LifeCycleEventType.RUM_EVENT_COLLECTED, collectedRumEvent)
expect(sendSpy).toHaveBeenCalled()
})
})

@@ -18,2 +18,3 @@ import { combine, Configuration, InternalMonitoring, isEventBridgePresent, Observable } from '@datadog/browser-core'

import { startRumBatch } from '../transport/batch'
import { startRumEventBridge } from '../transport/startRumEventBridge'
import { startUrlContexts } from '../domain/urlContexts'

@@ -42,3 +43,3 @@ import { createLocationChangeObservable, LocationChange } from '../browser/locationChangeObservable'

parentContexts.findView(),
getCommonContext().context
{ view: { name: null } }
)

@@ -101,4 +102,11 @@ )

const foregroundContexts = startForegroundContexts()
const batch = startRumBatch(configuration, lifeCycle)
let stopBatch: () => void
if (isEventBridgePresent()) {
startRumEventBridge(lifeCycle)
} else {
;({ stop: stopBatch } = startRumBatch(configuration, lifeCycle))
}
startRumAssembly(applicationId, configuration, lifeCycle, session, parentContexts, urlContexts, getCommonContext)

@@ -113,3 +121,3 @@

// could be replaced by stopping all the component when they will all have a stop method
batch.stop()
stopBatch?.()
parentContexts.stop()

@@ -116,0 +124,0 @@ foregroundContexts.stop()

@@ -1,2 +0,2 @@

import { Configuration, generateUUID, performDraw, Session, startSessionManagement } from '@datadog/browser-core'
import { Configuration, performDraw, Session, startSessionManagement } from '@datadog/browser-core'
import { LifeCycle, LifeCycleEventType } from './lifeCycle'

@@ -51,3 +51,3 @@

return {
getId: () => generateUUID(),
getId: () => '00000000-aaaa-0000-aaaa-000000000000',
isTracked: () => true,

@@ -54,0 +54,0 @@ hasReplayPlan: () => true,

@@ -18,5 +18,3 @@ import { Batch, combine, Configuration, Context, HttpRequest, EndpointBuilder } from '@datadog/browser-core'

return {
stop() {
batch.stop()
},
stop: () => batch.stop(),
}

@@ -23,0 +21,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc