@datadog/browser-rum-core
Advanced tools
Comparing version 3.10.1 to 3.11.0
@@ -6,4 +6,4 @@ "use strict"; | ||
buildMode: 'release', | ||
sdkVersion: '3.10.1', | ||
sdkVersion: '3.11.0', | ||
}; | ||
//# sourceMappingURL=buildEnv.js.map |
@@ -9,2 +9,3 @@ "use strict"; | ||
var syntheticsContext_1 = require("./syntheticsContext"); | ||
var ciTestContext_1 = require("./ciTestContext"); | ||
var lifeCycle_1 = require("./lifeCycle"); | ||
@@ -16,2 +17,3 @@ var rumSessionManager_1 = require("./rumSessionManager"); | ||
SessionType["USER"] = "user"; | ||
SessionType["CI_TEST"] = "ci_test"; | ||
})(SessionType || (SessionType = {})); | ||
@@ -42,2 +44,3 @@ var VIEW_EVENTS_MODIFIABLE_FIELD_PATHS = [ | ||
var syntheticsContext = syntheticsContext_1.getSyntheticsContext(); | ||
var ciTestContext = ciTestContext_1.getCiTestContext(); | ||
lifeCycle.subscribe(lifeCycle_1.LifeCycleEventType.RAW_RUM_EVENT_COLLECTED, function (_a) { | ||
@@ -70,5 +73,6 @@ var startTime = _a.startTime, rawRumEvent = _a.rawRumEvent, domainContext = _a.domainContext, savedCommonContext = _a.savedCommonContext, customerContext = _a.customerContext; | ||
id: session.id, | ||
type: syntheticsContext ? SessionType.SYNTHETICS : SessionType.USER, | ||
type: syntheticsContext ? SessionType.SYNTHETICS : ciTestContext ? SessionType.CI_TEST : SessionType.USER, | ||
}, | ||
synthetics: syntheticsContext, | ||
ci_test: ciTestContext, | ||
}; | ||
@@ -75,0 +79,0 @@ var serverRumEvent = (needToAssembleWithAction(rawRumEvent) |
@@ -166,2 +166,5 @@ import { Context, Duration, ErrorSource, ErrorHandling, ResourceType, ServerDuration, TimeStamp } from '@datadog/browser-core'; | ||
}; | ||
ci_test?: { | ||
test_execution_id: string; | ||
}; | ||
} | ||
@@ -168,0 +171,0 @@ export interface ViewContext extends Context { |
@@ -631,3 +631,3 @@ /** | ||
*/ | ||
readonly type: 'user' | 'synthetics'; | ||
readonly type: 'user' | 'synthetics' | 'ci_test'; | ||
/** | ||
@@ -726,2 +726,11 @@ * Whether this session has a replay | ||
/** | ||
* CI Visibility properties | ||
*/ | ||
readonly ci_test?: { | ||
/** | ||
* The identifier of the current CI Visibility test execution | ||
*/ | ||
readonly test_execution_id: string; | ||
}; | ||
/** | ||
* Internal properties | ||
@@ -728,0 +737,0 @@ */ |
export var buildEnv = { | ||
buildMode: 'release', | ||
sdkVersion: '3.10.1', | ||
sdkVersion: '3.11.0', | ||
}; | ||
//# sourceMappingURL=buildEnv.js.map |
@@ -6,2 +6,3 @@ import { __spreadArrays } from "tslib"; | ||
import { getSyntheticsContext } from './syntheticsContext'; | ||
import { getCiTestContext } from './ciTestContext'; | ||
import { LifeCycleEventType } from './lifeCycle'; | ||
@@ -13,2 +14,3 @@ import { RumSessionPlan } from './rumSessionManager'; | ||
SessionType["USER"] = "user"; | ||
SessionType["CI_TEST"] = "ci_test"; | ||
})(SessionType || (SessionType = {})); | ||
@@ -39,2 +41,3 @@ var VIEW_EVENTS_MODIFIABLE_FIELD_PATHS = [ | ||
var syntheticsContext = getSyntheticsContext(); | ||
var ciTestContext = getCiTestContext(); | ||
lifeCycle.subscribe(LifeCycleEventType.RAW_RUM_EVENT_COLLECTED, function (_a) { | ||
@@ -67,5 +70,6 @@ var startTime = _a.startTime, rawRumEvent = _a.rawRumEvent, domainContext = _a.domainContext, savedCommonContext = _a.savedCommonContext, customerContext = _a.customerContext; | ||
id: session.id, | ||
type: syntheticsContext ? SessionType.SYNTHETICS : SessionType.USER, | ||
type: syntheticsContext ? SessionType.SYNTHETICS : ciTestContext ? SessionType.CI_TEST : SessionType.USER, | ||
}, | ||
synthetics: syntheticsContext, | ||
ci_test: ciTestContext, | ||
}; | ||
@@ -72,0 +76,0 @@ var serverRumEvent = (needToAssembleWithAction(rawRumEvent) |
@@ -166,2 +166,5 @@ import { Context, Duration, ErrorSource, ErrorHandling, ResourceType, ServerDuration, TimeStamp } from '@datadog/browser-core'; | ||
}; | ||
ci_test?: { | ||
test_execution_id: string; | ||
}; | ||
} | ||
@@ -168,0 +171,0 @@ export interface ViewContext extends Context { |
@@ -631,3 +631,3 @@ /** | ||
*/ | ||
readonly type: 'user' | 'synthetics'; | ||
readonly type: 'user' | 'synthetics' | 'ci_test'; | ||
/** | ||
@@ -726,2 +726,11 @@ * Whether this session has a replay | ||
/** | ||
* CI Visibility properties | ||
*/ | ||
readonly ci_test?: { | ||
/** | ||
* The identifier of the current CI Visibility test execution | ||
*/ | ||
readonly test_execution_id: string; | ||
}; | ||
/** | ||
* Internal properties | ||
@@ -728,0 +737,0 @@ */ |
{ | ||
"name": "@datadog/browser-rum-core", | ||
"version": "3.10.1", | ||
"version": "3.11.0", | ||
"license": "Apache-2.0", | ||
@@ -15,3 +15,3 @@ "main": "cjs/index.js", | ||
"dependencies": { | ||
"@datadog/browser-core": "3.10.1", | ||
"@datadog/browser-core": "3.11.0", | ||
"tslib": "^1.10.0" | ||
@@ -27,3 +27,3 @@ }, | ||
}, | ||
"gitHead": "38e598f1caf6000ec6ff1e0e0485370f14bf95fd" | ||
"gitHead": "31f3be59b072670e62fc1e2782a6210ad1d73a17" | ||
} |
@@ -15,2 +15,4 @@ import { | ||
mockSyntheticsWorkerValues, | ||
mockCiVisibilityWindowValues, | ||
cleanupCiVisibilityWindowValues, | ||
setup, | ||
@@ -64,2 +66,3 @@ TestSetupBuilder, | ||
cleanupSyntheticsWorkerValues() | ||
cleanupCiVisibilityWindowValues() | ||
}) | ||
@@ -531,2 +534,13 @@ | ||
it('should detect ci visibility tests based on ci visibility global window values', () => { | ||
mockCiVisibilityWindowValues('traceId') | ||
const { lifeCycle } = setupBuilder.build() | ||
notifyRawRumEvent(lifeCycle, { | ||
rawRumEvent: createRawRumEvent(RumEventType.VIEW), | ||
}) | ||
expect(serverRumEvents[0].session.type).toEqual('ci_test') | ||
}) | ||
it('should set the session.has_replay attribute if it is defined in the common context', () => { | ||
@@ -581,2 +595,15 @@ const { lifeCycle } = setupBuilder.build() | ||
describe('ci visibility context', () => { | ||
it('includes the ci visibility context', () => { | ||
mockCiVisibilityWindowValues('traceId') | ||
const { lifeCycle } = setupBuilder.build() | ||
notifyRawRumEvent(lifeCycle, { | ||
rawRumEvent: createRawRumEvent(RumEventType.VIEW), | ||
}) | ||
expect(serverRumEvents[0].ci_test).toBeTruthy() | ||
}) | ||
}) | ||
describe('error events limitation', () => { | ||
@@ -583,0 +610,0 @@ const notifiedRawErrors: RawError[] = [] |
@@ -29,2 +29,3 @@ import { | ||
import { getSyntheticsContext } from './syntheticsContext' | ||
import { getCiTestContext } from './ciTestContext' | ||
import { LifeCycle, LifeCycleEventType } from './lifeCycle' | ||
@@ -39,2 +40,3 @@ import { ParentContexts } from './parentContexts' | ||
USER = 'user', | ||
CI_TEST = 'ci_test', | ||
} | ||
@@ -79,2 +81,3 @@ | ||
const syntheticsContext = getSyntheticsContext() | ||
const ciTestContext = getCiTestContext() | ||
@@ -109,5 +112,6 @@ lifeCycle.subscribe( | ||
id: session.id, | ||
type: syntheticsContext ? SessionType.SYNTHETICS : SessionType.USER, | ||
type: syntheticsContext ? SessionType.SYNTHETICS : ciTestContext ? SessionType.CI_TEST : SessionType.USER, | ||
}, | ||
synthetics: syntheticsContext, | ||
ci_test: ciTestContext, | ||
} | ||
@@ -114,0 +118,0 @@ const serverRumEvent = (needToAssembleWithAction(rawRumEvent) |
@@ -1,3 +0,3 @@ | ||
import { createRumSessionManagerMock } from 'packages/rum-core/test/mockRumSessionManager' | ||
import { RelativeTime } from '@datadog/browser-core' | ||
import { createRumSessionManagerMock } from '../../test/mockRumSessionManager' | ||
import { setup, TestSetupBuilder } from '../../test/specHelper' | ||
@@ -4,0 +4,0 @@ import { startInternalContext } from './internalContext' |
import { Context, RelativeTime, Duration, relativeNow } from '@datadog/browser-core' | ||
import { LifeCycleEventType, RumEvent } from '@datadog/browser-rum-core' | ||
import { RumEvent } from '../../../rumEvent.types' | ||
import { TestSetupBuilder, setup, setupViewTest, ViewTest } from '../../../../test/specHelper' | ||
import { RumPerformanceNavigationTiming } from '../../../browser/performanceCollection' | ||
import { RumEventType } from '../../../rawRumEvent.types' | ||
import { LifeCycle } from '../../lifeCycle' | ||
import { LifeCycle, LifeCycleEventType } from '../../lifeCycle' | ||
import { PAGE_ACTIVITY_END_DELAY, PAGE_ACTIVITY_VALIDATION_DELAY } from '../../waitIdlePage' | ||
@@ -8,0 +8,0 @@ import { THROTTLE_VIEW_UPDATE_PERIOD } from './trackViews' |
@@ -194,2 +194,5 @@ import { | ||
} | ||
ci_test?: { | ||
test_execution_id: string | ||
} | ||
} | ||
@@ -196,0 +199,0 @@ |
@@ -681,3 +681,3 @@ /* eslint-disable */ | ||
*/ | ||
readonly type: 'user' | 'synthetics' | ||
readonly type: 'user' | 'synthetics' | 'ci_test' | ||
/** | ||
@@ -786,2 +786,11 @@ * Whether this session has a replay | ||
/** | ||
* CI Visibility properties | ||
*/ | ||
readonly ci_test?: { | ||
/** | ||
* The identifier of the current CI Visibility test execution | ||
*/ | ||
readonly test_execution_id: string | ||
} | ||
/** | ||
* Internal properties | ||
@@ -788,0 +797,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
996042
315
20341
+ Added@datadog/browser-core@3.11.0(transitive)
- Removed@datadog/browser-core@3.10.1(transitive)
Updated@datadog/browser-core@3.11.0