@datadog/browser-rum-core
Advanced tools
Comparing version 5.5.1 to 5.6.0
@@ -72,3 +72,3 @@ import type { Duration, RelativeTime } from '@datadog/browser-core'; | ||
element?: Element; | ||
toJSON(): Omit<PerformanceEntry, 'toJSON'>; | ||
toJSON(): Omit<RumLargestContentfulPaintTiming, 'toJSON'>; | ||
} | ||
@@ -75,0 +75,0 @@ export interface RumFirstInputTiming { |
@@ -57,3 +57,3 @@ "use strict"; | ||
}, | ||
browser_sdk_version: (0, browser_core_1.canUseEventBridge)() ? "5.5.1" : undefined, | ||
browser_sdk_version: (0, browser_core_1.canUseEventBridge)() ? "5.6.0" : undefined, | ||
}, | ||
@@ -60,0 +60,0 @@ application: { |
@@ -10,4 +10,4 @@ "use strict"; | ||
exports.LCP_MAXIMUM_DELAY = 10 * browser_core_1.ONE_MINUTE; | ||
var zeroLcpReported = false; | ||
var previousNonZeroLcp; | ||
var wrongLcpReported = false; | ||
var previousLcp; | ||
/** | ||
@@ -40,3 +40,5 @@ * Track the largest contentful paint (LCP) occurring during the initial View. This can yield | ||
if ((0, browser_core_1.isExperimentalFeatureEnabled)(browser_core_1.ExperimentalFeature.ZERO_LCP_TELEMETRY)) { | ||
monitorZeroLcpEntry(lcpEntry); | ||
monitorLcpEntries(lcpEntry, entries.filter(function (entry) { | ||
return entry.entryType === performanceCollection_1.RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT; | ||
})); | ||
} | ||
@@ -57,21 +59,32 @@ callback({ | ||
exports.trackLargestContentfulPaint = trackLargestContentfulPaint; | ||
function monitorZeroLcpEntry(lcpEntry) { | ||
if (!zeroLcpReported && lcpEntry.startTime !== 0) { | ||
previousNonZeroLcp = lcpEntry.toJSON(); | ||
function monitorLcpEntries(lcpEntry, lcpEntries) { | ||
if (wrongLcpReported) { | ||
return; | ||
} | ||
if (!zeroLcpReported && lcpEntry.startTime === 0) { | ||
zeroLcpReported = true; | ||
(0, browser_core_1.addTelemetryDebug)('LCP with startTime = 0', { | ||
var wrongLcpDetected = lcpEntry.startTime === 0 | ||
? 'LCP with startTime = 0' | ||
: previousLcp !== undefined && lcpEntry.startTime < previousLcp.startTime | ||
? 'LCP with startTime < previous LCP' | ||
: previousLcp !== undefined && lcpEntry.size < previousLcp.size | ||
? 'LCP with size < previous LCP' | ||
: undefined; | ||
if (wrongLcpDetected) { | ||
wrongLcpReported = true; | ||
(0, browser_core_1.addTelemetryDebug)(wrongLcpDetected, { | ||
debug: { | ||
entry: lcpEntry.toJSON(), | ||
previousNonZeroLcp: previousNonZeroLcp, | ||
navigationStart: performance.timing.navigationStart, | ||
entry: toSerializableLCP(lcpEntry), | ||
previousLcp: previousLcp, | ||
timeOrigin: performance.timeOrigin, | ||
now: (0, browser_core_1.relativeNow)(), | ||
visibilityState: document.visibilityState, | ||
prerendering: document.prerendering, | ||
lcpEntries: lcpEntries.map(toSerializableLCP), | ||
}, | ||
}); | ||
} | ||
previousLcp = toSerializableLCP(lcpEntry); | ||
} | ||
function toSerializableLCP(entry) { | ||
var jsonEntry = entry.toJSON(); | ||
delete jsonEntry.element; | ||
return jsonEntry; | ||
} | ||
//# sourceMappingURL=trackLargestContentfulPaint.js.map |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
export type RumActionEvent = CommonProperties & { | ||
export type RumActionEvent = CommonProperties & ViewContainerSchema & { | ||
/** | ||
@@ -154,3 +154,3 @@ * RUM event type | ||
*/ | ||
export type RumErrorEvent = CommonProperties & ActionChildProperties & { | ||
export type RumErrorEvent = CommonProperties & ActionChildProperties & ViewContainerSchema & { | ||
/** | ||
@@ -285,3 +285,3 @@ * RUM event type | ||
*/ | ||
export type RumLongTaskEvent = CommonProperties & ActionChildProperties & { | ||
export type RumLongTaskEvent = CommonProperties & ActionChildProperties & ViewContainerSchema & { | ||
/** | ||
@@ -324,3 +324,3 @@ * RUM event type | ||
*/ | ||
export type RumResourceEvent = CommonProperties & ActionChildProperties & { | ||
export type RumResourceEvent = CommonProperties & ActionChildProperties & ViewContainerSchema & { | ||
/** | ||
@@ -515,3 +515,3 @@ * RUM event type | ||
*/ | ||
export type RumViewEvent = CommonProperties & { | ||
export type RumViewEvent = CommonProperties & ViewContainerSchema & { | ||
/** | ||
@@ -738,6 +738,2 @@ * RUM event type | ||
/** | ||
* The precondition that led to the creation of the session | ||
*/ | ||
readonly start_precondition?: 'app_launch' | 'inactivity_timeout' | 'max_duration' | 'explicit_stop' | 'background_event'; | ||
/** | ||
* Whether this session is currently active. Set to false to manually stop a session | ||
@@ -881,2 +877,6 @@ */ | ||
/** | ||
* Generated unique ID of the application build. Unlike version or build_version this field is not meant to be coming from the user, but rather generated by the tooling for each build. | ||
*/ | ||
readonly build_id?: string; | ||
/** | ||
* Session properties | ||
@@ -1083,2 +1083,6 @@ */ | ||
plan?: 1 | 2; | ||
/** | ||
* The precondition that led to the creation of the session | ||
*/ | ||
readonly session_precondition?: 'user_app_launch' | 'inactivity_timeout' | 'max_duration' | 'background_launch' | 'prewarm' | 'from_non_interactive_session' | 'explicit_stop'; | ||
[k: string]: unknown; | ||
@@ -1115,2 +1119,28 @@ }; | ||
/** | ||
* View Container schema for views that are nested (webviews in mobile) | ||
*/ | ||
export interface ViewContainerSchema { | ||
/** | ||
* View Container properties (view wrapping the current view) | ||
*/ | ||
readonly container?: { | ||
/** | ||
* Attributes of the view's container | ||
*/ | ||
readonly view: { | ||
/** | ||
* ID of the parent view | ||
*/ | ||
readonly id: string; | ||
[k: string]: unknown; | ||
}; | ||
/** | ||
* Source of the parent view | ||
*/ | ||
readonly source: 'android' | 'ios' | 'browser' | 'flutter' | 'react-native' | 'roku'; | ||
[k: string]: unknown; | ||
}; | ||
[k: string]: unknown; | ||
} | ||
/** | ||
* Schema of all properties of events that can have parent actions | ||
@@ -1117,0 +1147,0 @@ */ |
@@ -72,3 +72,3 @@ import type { Duration, RelativeTime } from '@datadog/browser-core'; | ||
element?: Element; | ||
toJSON(): Omit<PerformanceEntry, 'toJSON'>; | ||
toJSON(): Omit<RumLargestContentfulPaintTiming, 'toJSON'>; | ||
} | ||
@@ -75,0 +75,0 @@ export interface RumFirstInputTiming { |
@@ -54,3 +54,3 @@ import { combine, isEmptyObject, timeStampNow, currentDrift, display, createEventRateLimiter, canUseEventBridge, assign, round, } from '@datadog/browser-core'; | ||
}, | ||
browser_sdk_version: canUseEventBridge() ? "5.5.1" : undefined, | ||
browser_sdk_version: canUseEventBridge() ? "5.6.0" : undefined, | ||
}, | ||
@@ -57,0 +57,0 @@ application: { |
@@ -7,4 +7,4 @@ import { DOM_EVENT, ExperimentalFeature, ONE_MINUTE, addEventListeners, addTelemetryDebug, findLast, isExperimentalFeatureEnabled, relativeNow, } from '@datadog/browser-core'; | ||
export var LCP_MAXIMUM_DELAY = 10 * ONE_MINUTE; | ||
var zeroLcpReported = false; | ||
var previousNonZeroLcp; | ||
var wrongLcpReported = false; | ||
var previousLcp; | ||
/** | ||
@@ -37,3 +37,5 @@ * Track the largest contentful paint (LCP) occurring during the initial View. This can yield | ||
if (isExperimentalFeatureEnabled(ExperimentalFeature.ZERO_LCP_TELEMETRY)) { | ||
monitorZeroLcpEntry(lcpEntry); | ||
monitorLcpEntries(lcpEntry, entries.filter(function (entry) { | ||
return entry.entryType === RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT; | ||
})); | ||
} | ||
@@ -53,21 +55,32 @@ callback({ | ||
} | ||
function monitorZeroLcpEntry(lcpEntry) { | ||
if (!zeroLcpReported && lcpEntry.startTime !== 0) { | ||
previousNonZeroLcp = lcpEntry.toJSON(); | ||
function monitorLcpEntries(lcpEntry, lcpEntries) { | ||
if (wrongLcpReported) { | ||
return; | ||
} | ||
if (!zeroLcpReported && lcpEntry.startTime === 0) { | ||
zeroLcpReported = true; | ||
addTelemetryDebug('LCP with startTime = 0', { | ||
var wrongLcpDetected = lcpEntry.startTime === 0 | ||
? 'LCP with startTime = 0' | ||
: previousLcp !== undefined && lcpEntry.startTime < previousLcp.startTime | ||
? 'LCP with startTime < previous LCP' | ||
: previousLcp !== undefined && lcpEntry.size < previousLcp.size | ||
? 'LCP with size < previous LCP' | ||
: undefined; | ||
if (wrongLcpDetected) { | ||
wrongLcpReported = true; | ||
addTelemetryDebug(wrongLcpDetected, { | ||
debug: { | ||
entry: lcpEntry.toJSON(), | ||
previousNonZeroLcp: previousNonZeroLcp, | ||
navigationStart: performance.timing.navigationStart, | ||
entry: toSerializableLCP(lcpEntry), | ||
previousLcp: previousLcp, | ||
timeOrigin: performance.timeOrigin, | ||
now: relativeNow(), | ||
visibilityState: document.visibilityState, | ||
prerendering: document.prerendering, | ||
lcpEntries: lcpEntries.map(toSerializableLCP), | ||
}, | ||
}); | ||
} | ||
previousLcp = toSerializableLCP(lcpEntry); | ||
} | ||
function toSerializableLCP(entry) { | ||
var jsonEntry = entry.toJSON(); | ||
delete jsonEntry.element; | ||
return jsonEntry; | ||
} | ||
//# sourceMappingURL=trackLargestContentfulPaint.js.map |
@@ -11,3 +11,3 @@ /** | ||
*/ | ||
export type RumActionEvent = CommonProperties & { | ||
export type RumActionEvent = CommonProperties & ViewContainerSchema & { | ||
/** | ||
@@ -154,3 +154,3 @@ * RUM event type | ||
*/ | ||
export type RumErrorEvent = CommonProperties & ActionChildProperties & { | ||
export type RumErrorEvent = CommonProperties & ActionChildProperties & ViewContainerSchema & { | ||
/** | ||
@@ -285,3 +285,3 @@ * RUM event type | ||
*/ | ||
export type RumLongTaskEvent = CommonProperties & ActionChildProperties & { | ||
export type RumLongTaskEvent = CommonProperties & ActionChildProperties & ViewContainerSchema & { | ||
/** | ||
@@ -324,3 +324,3 @@ * RUM event type | ||
*/ | ||
export type RumResourceEvent = CommonProperties & ActionChildProperties & { | ||
export type RumResourceEvent = CommonProperties & ActionChildProperties & ViewContainerSchema & { | ||
/** | ||
@@ -515,3 +515,3 @@ * RUM event type | ||
*/ | ||
export type RumViewEvent = CommonProperties & { | ||
export type RumViewEvent = CommonProperties & ViewContainerSchema & { | ||
/** | ||
@@ -738,6 +738,2 @@ * RUM event type | ||
/** | ||
* The precondition that led to the creation of the session | ||
*/ | ||
readonly start_precondition?: 'app_launch' | 'inactivity_timeout' | 'max_duration' | 'explicit_stop' | 'background_event'; | ||
/** | ||
* Whether this session is currently active. Set to false to manually stop a session | ||
@@ -881,2 +877,6 @@ */ | ||
/** | ||
* Generated unique ID of the application build. Unlike version or build_version this field is not meant to be coming from the user, but rather generated by the tooling for each build. | ||
*/ | ||
readonly build_id?: string; | ||
/** | ||
* Session properties | ||
@@ -1083,2 +1083,6 @@ */ | ||
plan?: 1 | 2; | ||
/** | ||
* The precondition that led to the creation of the session | ||
*/ | ||
readonly session_precondition?: 'user_app_launch' | 'inactivity_timeout' | 'max_duration' | 'background_launch' | 'prewarm' | 'from_non_interactive_session' | 'explicit_stop'; | ||
[k: string]: unknown; | ||
@@ -1115,2 +1119,28 @@ }; | ||
/** | ||
* View Container schema for views that are nested (webviews in mobile) | ||
*/ | ||
export interface ViewContainerSchema { | ||
/** | ||
* View Container properties (view wrapping the current view) | ||
*/ | ||
readonly container?: { | ||
/** | ||
* Attributes of the view's container | ||
*/ | ||
readonly view: { | ||
/** | ||
* ID of the parent view | ||
*/ | ||
readonly id: string; | ||
[k: string]: unknown; | ||
}; | ||
/** | ||
* Source of the parent view | ||
*/ | ||
readonly source: 'android' | 'ios' | 'browser' | 'flutter' | 'react-native' | 'roku'; | ||
[k: string]: unknown; | ||
}; | ||
[k: string]: unknown; | ||
} | ||
/** | ||
* Schema of all properties of events that can have parent actions | ||
@@ -1117,0 +1147,0 @@ */ |
{ | ||
"name": "@datadog/browser-rum-core", | ||
"version": "5.5.1", | ||
"version": "5.6.0", | ||
"license": "Apache-2.0", | ||
@@ -15,3 +15,3 @@ "main": "cjs/index.js", | ||
"dependencies": { | ||
"@datadog/browser-core": "5.5.1" | ||
"@datadog/browser-core": "5.6.0" | ||
}, | ||
@@ -32,3 +32,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "1c876be1b0f5ffd4b3a49b2f74c912598065755d" | ||
"gitHead": "05639c3fb1cf1aefa19b9a49cec182a628135acb" | ||
} |
@@ -99,3 +99,3 @@ import type { Duration, RelativeTime, TimeStamp } from '@datadog/browser-core' | ||
element?: Element | ||
toJSON(): Omit<PerformanceEntry, 'toJSON'> | ||
toJSON(): Omit<RumLargestContentfulPaintTiming, 'toJSON'> | ||
} | ||
@@ -102,0 +102,0 @@ |
@@ -29,5 +29,7 @@ import type { RelativeTime } from '@datadog/browser-core' | ||
let zeroLcpReported = false | ||
let previousNonZeroLcp: Omit<PerformanceEntry, 'toJSON'> | undefined | ||
type SerializableLCP = Omit<RumLargestContentfulPaintTiming, 'toJSON' | 'element'> | ||
let wrongLcpReported = false | ||
let previousLcp: SerializableLCP | ||
/** | ||
@@ -79,3 +81,9 @@ * Track the largest contentful paint (LCP) occurring during the initial View. This can yield | ||
if (isExperimentalFeatureEnabled(ExperimentalFeature.ZERO_LCP_TELEMETRY)) { | ||
monitorZeroLcpEntry(lcpEntry) | ||
monitorLcpEntries( | ||
lcpEntry, | ||
entries.filter( | ||
(entry): entry is RumLargestContentfulPaintTiming => | ||
entry.entryType === RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT | ||
) | ||
) | ||
} | ||
@@ -99,22 +107,37 @@ | ||
function monitorZeroLcpEntry(lcpEntry: RumLargestContentfulPaintTiming) { | ||
if (!zeroLcpReported && lcpEntry.startTime !== 0) { | ||
previousNonZeroLcp = lcpEntry.toJSON() | ||
function monitorLcpEntries(lcpEntry: RumLargestContentfulPaintTiming, lcpEntries: RumLargestContentfulPaintTiming[]) { | ||
if (wrongLcpReported) { | ||
return | ||
} | ||
if (!zeroLcpReported && lcpEntry.startTime === 0) { | ||
zeroLcpReported = true | ||
const wrongLcpDetected = | ||
lcpEntry.startTime === 0 | ||
? 'LCP with startTime = 0' | ||
: previousLcp !== undefined && lcpEntry.startTime < previousLcp.startTime | ||
? 'LCP with startTime < previous LCP' | ||
: previousLcp !== undefined && lcpEntry.size < previousLcp.size | ||
? 'LCP with size < previous LCP' | ||
: undefined | ||
addTelemetryDebug('LCP with startTime = 0', { | ||
if (wrongLcpDetected) { | ||
wrongLcpReported = true | ||
addTelemetryDebug(wrongLcpDetected, { | ||
debug: { | ||
entry: lcpEntry.toJSON(), | ||
previousNonZeroLcp, | ||
navigationStart: performance.timing.navigationStart, | ||
entry: toSerializableLCP(lcpEntry), | ||
previousLcp, | ||
timeOrigin: performance.timeOrigin, | ||
now: relativeNow(), | ||
visibilityState: document.visibilityState, | ||
prerendering: (document as any).prerendering, | ||
lcpEntries: lcpEntries.map(toSerializableLCP), | ||
}, | ||
}) | ||
} | ||
previousLcp = toSerializableLCP(lcpEntry) | ||
} | ||
function toSerializableLCP(entry: RumLargestContentfulPaintTiming): SerializableLCP { | ||
const jsonEntry = entry.toJSON() | ||
delete jsonEntry.element | ||
return jsonEntry | ||
} |
@@ -13,133 +13,136 @@ /* eslint-disable */ | ||
*/ | ||
export type RumActionEvent = CommonProperties & { | ||
/** | ||
* RUM event type | ||
*/ | ||
readonly type: 'action' | ||
/** | ||
* Action properties | ||
*/ | ||
readonly action: { | ||
export type RumActionEvent = CommonProperties & | ||
ViewContainerSchema & { | ||
/** | ||
* Type of the action | ||
* RUM event type | ||
*/ | ||
readonly type: 'custom' | 'click' | 'tap' | 'scroll' | 'swipe' | 'application_start' | 'back' | ||
readonly type: 'action' | ||
/** | ||
* UUID of the action | ||
* Action properties | ||
*/ | ||
readonly id?: string | ||
/** | ||
* Duration in ns to the action is considered loaded | ||
*/ | ||
readonly loading_time?: number | ||
/** | ||
* Action target properties | ||
*/ | ||
readonly target?: { | ||
readonly action: { | ||
/** | ||
* Target name | ||
* Type of the action | ||
*/ | ||
name: string | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Action frustration properties | ||
*/ | ||
readonly frustration?: { | ||
readonly type: 'custom' | 'click' | 'tap' | 'scroll' | 'swipe' | 'application_start' | 'back' | ||
/** | ||
* Action frustration types | ||
* UUID of the action | ||
*/ | ||
readonly type: ('rage_click' | 'dead_click' | 'error_click' | 'rage_tap' | 'error_tap')[] | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the errors of the action | ||
*/ | ||
readonly error?: { | ||
readonly id?: string | ||
/** | ||
* Number of errors that occurred on the action | ||
* Duration in ns to the action is considered loaded | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the crashes of the action | ||
*/ | ||
readonly crash?: { | ||
readonly loading_time?: number | ||
/** | ||
* Number of crashes that occurred on the action | ||
* Action target properties | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the long tasks of the action | ||
*/ | ||
readonly long_task?: { | ||
readonly target?: { | ||
/** | ||
* Target name | ||
*/ | ||
name: string | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Number of long tasks that occurred on the action | ||
* Action frustration properties | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the resources of the action | ||
*/ | ||
readonly resource?: { | ||
readonly frustration?: { | ||
/** | ||
* Action frustration types | ||
*/ | ||
readonly type: ('rage_click' | 'dead_click' | 'error_click' | 'rage_tap' | 'error_tap')[] | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Number of resources that occurred on the action | ||
* Properties of the errors of the action | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
} | ||
/** | ||
* View properties | ||
*/ | ||
readonly view?: { | ||
/** | ||
* Is the action starting in the foreground (focus in browser) | ||
*/ | ||
readonly in_foreground?: boolean | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Internal properties | ||
*/ | ||
_dd?: { | ||
/** | ||
* Action properties | ||
*/ | ||
readonly action?: { | ||
readonly error?: { | ||
/** | ||
* Number of errors that occurred on the action | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Action position properties | ||
* Properties of the crashes of the action | ||
*/ | ||
readonly position?: { | ||
readonly crash?: { | ||
/** | ||
* X coordinate relative to the target element of the action (in pixels) | ||
* Number of crashes that occurred on the action | ||
*/ | ||
readonly x: number | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the long tasks of the action | ||
*/ | ||
readonly long_task?: { | ||
/** | ||
* Y coordinate relative to the target element of the action (in pixels) | ||
* Number of long tasks that occurred on the action | ||
*/ | ||
readonly y: number | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Target properties | ||
* Properties of the resources of the action | ||
*/ | ||
target?: { | ||
readonly resource?: { | ||
/** | ||
* CSS selector path of the target element | ||
* Number of resources that occurred on the action | ||
*/ | ||
readonly selector?: string | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
} | ||
/** | ||
* View properties | ||
*/ | ||
readonly view?: { | ||
/** | ||
* Is the action starting in the foreground (focus in browser) | ||
*/ | ||
readonly in_foreground?: boolean | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Internal properties | ||
*/ | ||
_dd?: { | ||
/** | ||
* Action properties | ||
*/ | ||
readonly action?: { | ||
/** | ||
* Width of the target element (in pixels) | ||
* Action position properties | ||
*/ | ||
readonly width?: number | ||
readonly position?: { | ||
/** | ||
* X coordinate relative to the target element of the action (in pixels) | ||
*/ | ||
readonly x: number | ||
/** | ||
* Y coordinate relative to the target element of the action (in pixels) | ||
*/ | ||
readonly y: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Height of the target element (in pixels) | ||
* Target properties | ||
*/ | ||
readonly height?: number | ||
target?: { | ||
/** | ||
* CSS selector path of the target element | ||
*/ | ||
readonly selector?: string | ||
/** | ||
* Width of the target element (in pixels) | ||
*/ | ||
readonly width?: number | ||
/** | ||
* Height of the target element (in pixels) | ||
*/ | ||
readonly height?: number | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
@@ -151,4 +154,2 @@ } | ||
} | ||
[k: string]: unknown | ||
} | ||
/** | ||
@@ -158,3 +159,4 @@ * Schema of all properties of an Error event | ||
export type RumErrorEvent = CommonProperties & | ||
ActionChildProperties & { | ||
ActionChildProperties & | ||
ViewContainerSchema & { | ||
/** | ||
@@ -304,3 +306,4 @@ * RUM event type | ||
export type RumLongTaskEvent = CommonProperties & | ||
ActionChildProperties & { | ||
ActionChildProperties & | ||
ViewContainerSchema & { | ||
/** | ||
@@ -344,3 +347,4 @@ * RUM event type | ||
export type RumResourceEvent = CommonProperties & | ||
ActionChildProperties & { | ||
ActionChildProperties & | ||
ViewContainerSchema & { | ||
/** | ||
@@ -560,348 +564,340 @@ * RUM event type | ||
*/ | ||
export type RumViewEvent = CommonProperties & { | ||
/** | ||
* RUM event type | ||
*/ | ||
readonly type: 'view' | ||
/** | ||
* View properties | ||
*/ | ||
readonly view: { | ||
export type RumViewEvent = CommonProperties & | ||
ViewContainerSchema & { | ||
/** | ||
* Duration in ns to the view is considered loaded | ||
* RUM event type | ||
*/ | ||
readonly loading_time?: number | ||
readonly type: 'view' | ||
/** | ||
* Type of the loading of the view | ||
* View properties | ||
*/ | ||
readonly loading_type?: | ||
| 'initial_load' | ||
| 'route_change' | ||
| 'activity_display' | ||
| 'activity_redisplay' | ||
| 'fragment_display' | ||
| 'fragment_redisplay' | ||
| 'view_controller_display' | ||
| 'view_controller_redisplay' | ||
/** | ||
* Time spent on the view in ns | ||
*/ | ||
readonly time_spent: number | ||
/** | ||
* Duration in ns to the first rendering | ||
*/ | ||
readonly first_contentful_paint?: number | ||
/** | ||
* Duration in ns to the largest contentful paint | ||
*/ | ||
readonly largest_contentful_paint?: number | ||
/** | ||
* CSS selector path of the largest contentful paint element | ||
*/ | ||
readonly largest_contentful_paint_target_selector?: string | ||
/** | ||
* Duration in ns of the first input event delay | ||
*/ | ||
readonly first_input_delay?: number | ||
/** | ||
* Duration in ns to the first input | ||
*/ | ||
readonly first_input_time?: number | ||
/** | ||
* CSS selector path of the first input target element | ||
*/ | ||
readonly first_input_target_selector?: string | ||
/** | ||
* Longest duration in ns between an interaction and the next paint | ||
*/ | ||
readonly interaction_to_next_paint?: number | ||
/** | ||
* CSS selector path of the interacted element corresponding to INP | ||
*/ | ||
readonly interaction_to_next_paint_target_selector?: string | ||
/** | ||
* Total layout shift score that occurred on the view | ||
*/ | ||
readonly cumulative_layout_shift?: number | ||
/** | ||
* CSS selector path of the first element (in document order) of the largest layout shift contributing to CLS | ||
*/ | ||
readonly cumulative_layout_shift_target_selector?: string | ||
/** | ||
* Duration in ns to the complete parsing and loading of the document and its sub resources | ||
*/ | ||
readonly dom_complete?: number | ||
/** | ||
* Duration in ns to the complete parsing and loading of the document without its sub resources | ||
*/ | ||
readonly dom_content_loaded?: number | ||
/** | ||
* Duration in ns to the end of the parsing of the document | ||
*/ | ||
readonly dom_interactive?: number | ||
/** | ||
* Duration in ns to the end of the load event handler execution | ||
*/ | ||
readonly load_event?: number | ||
/** | ||
* Duration in ns to the response start of the document request | ||
*/ | ||
readonly first_byte?: number | ||
/** | ||
* User custom timings of the view. As timing name is used as facet path, it must contain only letters, digits, or the characters - _ . @ $ | ||
*/ | ||
readonly custom_timings?: { | ||
[k: string]: number | ||
} | ||
/** | ||
* Whether the View corresponding to this event is considered active | ||
*/ | ||
readonly is_active?: boolean | ||
/** | ||
* Whether the View had a low average refresh rate | ||
*/ | ||
readonly is_slow_rendered?: boolean | ||
/** | ||
* Properties of the actions of the view | ||
*/ | ||
readonly action: { | ||
readonly view: { | ||
/** | ||
* Number of actions that occurred on the view | ||
* Duration in ns to the view is considered loaded | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the errors of the view | ||
*/ | ||
readonly error: { | ||
readonly loading_time?: number | ||
/** | ||
* Number of errors that occurred on the view | ||
* Type of the loading of the view | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the crashes of the view | ||
*/ | ||
readonly crash?: { | ||
readonly loading_type?: | ||
| 'initial_load' | ||
| 'route_change' | ||
| 'activity_display' | ||
| 'activity_redisplay' | ||
| 'fragment_display' | ||
| 'fragment_redisplay' | ||
| 'view_controller_display' | ||
| 'view_controller_redisplay' | ||
/** | ||
* Number of crashes that occurred on the view | ||
* Time spent on the view in ns | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the long tasks of the view | ||
*/ | ||
readonly long_task?: { | ||
readonly time_spent: number | ||
/** | ||
* Number of long tasks that occurred on the view | ||
* Duration in ns to the first rendering | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the frozen frames of the view | ||
*/ | ||
readonly frozen_frame?: { | ||
readonly first_contentful_paint?: number | ||
/** | ||
* Number of frozen frames that occurred on the view | ||
* Duration in ns to the largest contentful paint | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the resources of the view | ||
*/ | ||
readonly resource: { | ||
readonly largest_contentful_paint?: number | ||
/** | ||
* Number of resources that occurred on the view | ||
* CSS selector path of the largest contentful paint element | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the frustrations of the view | ||
*/ | ||
readonly frustration?: { | ||
readonly largest_contentful_paint_target_selector?: string | ||
/** | ||
* Number of frustrations that occurred on the view | ||
* Duration in ns of the first input event delay | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* List of the periods of time the user had the view in foreground (focused in the browser) | ||
*/ | ||
readonly in_foreground_periods?: { | ||
readonly first_input_delay?: number | ||
/** | ||
* Duration in ns between start of the view and start of foreground period | ||
* Duration in ns to the first input | ||
*/ | ||
readonly start: number | ||
readonly first_input_time?: number | ||
/** | ||
* Duration in ns of the view foreground period | ||
* CSS selector path of the first input target element | ||
*/ | ||
readonly duration: number | ||
[k: string]: unknown | ||
}[] | ||
/** | ||
* Average memory used during the view lifetime (in bytes) | ||
*/ | ||
readonly memory_average?: number | ||
/** | ||
* Peak memory used during the view lifetime (in bytes) | ||
*/ | ||
readonly memory_max?: number | ||
/** | ||
* Total number of cpu ticks during the view’s lifetime | ||
*/ | ||
readonly cpu_ticks_count?: number | ||
/** | ||
* Average number of cpu ticks per second during the view’s lifetime | ||
*/ | ||
readonly cpu_ticks_per_second?: number | ||
/** | ||
* Average refresh rate during the view’s lifetime (in frames per second) | ||
*/ | ||
readonly refresh_rate_average?: number | ||
/** | ||
* Minimum refresh rate during the view’s lifetime (in frames per second) | ||
*/ | ||
readonly refresh_rate_min?: number | ||
/** | ||
* Time taken for Flutter 'build' methods. | ||
*/ | ||
flutter_build_time?: RumPerfMetric | ||
/** | ||
* Time taken for Flutter to rasterize the view. | ||
*/ | ||
flutter_raster_time?: RumPerfMetric | ||
/** | ||
* The JavaScript refresh rate for React Native | ||
*/ | ||
js_refresh_rate?: RumPerfMetric | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Session properties | ||
*/ | ||
readonly session?: { | ||
/** | ||
* The precondition that led to the creation of the session | ||
*/ | ||
readonly start_precondition?: | ||
| 'app_launch' | ||
| 'inactivity_timeout' | ||
| 'max_duration' | ||
| 'explicit_stop' | ||
| 'background_event' | ||
/** | ||
* Whether this session is currently active. Set to false to manually stop a session | ||
*/ | ||
readonly is_active?: boolean | ||
/** | ||
* Whether this session has been sampled for replay | ||
*/ | ||
readonly sampled_for_replay?: boolean | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Feature flags properties | ||
*/ | ||
readonly feature_flags?: { | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Privacy properties | ||
*/ | ||
readonly privacy?: { | ||
/** | ||
* The replay privacy level | ||
*/ | ||
readonly replay_level: 'allow' | 'mask' | 'mask-user-input' | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Internal properties | ||
*/ | ||
readonly _dd: { | ||
/** | ||
* Version of the update of the view event | ||
*/ | ||
readonly document_version: number | ||
/** | ||
* List of the page states during the view | ||
*/ | ||
readonly page_states?: { | ||
readonly first_input_target_selector?: string | ||
/** | ||
* Page state name | ||
* Longest duration in ns between an interaction and the next paint | ||
*/ | ||
readonly state: 'active' | 'passive' | 'hidden' | 'frozen' | 'terminated' | ||
readonly interaction_to_next_paint?: number | ||
/** | ||
* Duration in ns between start of the view and start of the page state | ||
* CSS selector path of the interacted element corresponding to INP | ||
*/ | ||
readonly start: number | ||
readonly interaction_to_next_paint_target_selector?: string | ||
/** | ||
* Total layout shift score that occurred on the view | ||
*/ | ||
readonly cumulative_layout_shift?: number | ||
/** | ||
* CSS selector path of the first element (in document order) of the largest layout shift contributing to CLS | ||
*/ | ||
readonly cumulative_layout_shift_target_selector?: string | ||
/** | ||
* Duration in ns to the complete parsing and loading of the document and its sub resources | ||
*/ | ||
readonly dom_complete?: number | ||
/** | ||
* Duration in ns to the complete parsing and loading of the document without its sub resources | ||
*/ | ||
readonly dom_content_loaded?: number | ||
/** | ||
* Duration in ns to the end of the parsing of the document | ||
*/ | ||
readonly dom_interactive?: number | ||
/** | ||
* Duration in ns to the end of the load event handler execution | ||
*/ | ||
readonly load_event?: number | ||
/** | ||
* Duration in ns to the response start of the document request | ||
*/ | ||
readonly first_byte?: number | ||
/** | ||
* User custom timings of the view. As timing name is used as facet path, it must contain only letters, digits, or the characters - _ . @ $ | ||
*/ | ||
readonly custom_timings?: { | ||
[k: string]: number | ||
} | ||
/** | ||
* Whether the View corresponding to this event is considered active | ||
*/ | ||
readonly is_active?: boolean | ||
/** | ||
* Whether the View had a low average refresh rate | ||
*/ | ||
readonly is_slow_rendered?: boolean | ||
/** | ||
* Properties of the actions of the view | ||
*/ | ||
readonly action: { | ||
/** | ||
* Number of actions that occurred on the view | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the errors of the view | ||
*/ | ||
readonly error: { | ||
/** | ||
* Number of errors that occurred on the view | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the crashes of the view | ||
*/ | ||
readonly crash?: { | ||
/** | ||
* Number of crashes that occurred on the view | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the long tasks of the view | ||
*/ | ||
readonly long_task?: { | ||
/** | ||
* Number of long tasks that occurred on the view | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the frozen frames of the view | ||
*/ | ||
readonly frozen_frame?: { | ||
/** | ||
* Number of frozen frames that occurred on the view | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the resources of the view | ||
*/ | ||
readonly resource: { | ||
/** | ||
* Number of resources that occurred on the view | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Properties of the frustrations of the view | ||
*/ | ||
readonly frustration?: { | ||
/** | ||
* Number of frustrations that occurred on the view | ||
*/ | ||
readonly count: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* List of the periods of time the user had the view in foreground (focused in the browser) | ||
*/ | ||
readonly in_foreground_periods?: { | ||
/** | ||
* Duration in ns between start of the view and start of foreground period | ||
*/ | ||
readonly start: number | ||
/** | ||
* Duration in ns of the view foreground period | ||
*/ | ||
readonly duration: number | ||
[k: string]: unknown | ||
}[] | ||
/** | ||
* Average memory used during the view lifetime (in bytes) | ||
*/ | ||
readonly memory_average?: number | ||
/** | ||
* Peak memory used during the view lifetime (in bytes) | ||
*/ | ||
readonly memory_max?: number | ||
/** | ||
* Total number of cpu ticks during the view’s lifetime | ||
*/ | ||
readonly cpu_ticks_count?: number | ||
/** | ||
* Average number of cpu ticks per second during the view’s lifetime | ||
*/ | ||
readonly cpu_ticks_per_second?: number | ||
/** | ||
* Average refresh rate during the view’s lifetime (in frames per second) | ||
*/ | ||
readonly refresh_rate_average?: number | ||
/** | ||
* Minimum refresh rate during the view’s lifetime (in frames per second) | ||
*/ | ||
readonly refresh_rate_min?: number | ||
/** | ||
* Time taken for Flutter 'build' methods. | ||
*/ | ||
flutter_build_time?: RumPerfMetric | ||
/** | ||
* Time taken for Flutter to rasterize the view. | ||
*/ | ||
flutter_raster_time?: RumPerfMetric | ||
/** | ||
* The JavaScript refresh rate for React Native | ||
*/ | ||
js_refresh_rate?: RumPerfMetric | ||
[k: string]: unknown | ||
}[] | ||
} | ||
/** | ||
* Debug metadata for Replay Sessions | ||
* Session properties | ||
*/ | ||
replay_stats?: { | ||
readonly session?: { | ||
/** | ||
* The number of records produced during this view lifetime | ||
* Whether this session is currently active. Set to false to manually stop a session | ||
*/ | ||
records_count?: number | ||
readonly is_active?: boolean | ||
/** | ||
* The number of segments sent during this view lifetime | ||
* Whether this session has been sampled for replay | ||
*/ | ||
segments_count?: number | ||
/** | ||
* The total size in bytes of the segments sent during this view lifetime | ||
*/ | ||
segments_total_raw_size?: number | ||
readonly sampled_for_replay?: boolean | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Subset of the SDK configuration options in use during its execution | ||
* Feature flags properties | ||
*/ | ||
readonly configuration?: { | ||
readonly feature_flags?: { | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Privacy properties | ||
*/ | ||
readonly privacy?: { | ||
/** | ||
* Whether session replay recording configured to start manually | ||
* The replay privacy level | ||
*/ | ||
readonly start_session_replay_recording_manually?: boolean | ||
readonly replay_level: 'allow' | 'mask' | 'mask-user-input' | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Display properties | ||
*/ | ||
readonly display?: { | ||
/** | ||
* Scroll properties | ||
* Internal properties | ||
*/ | ||
readonly scroll?: { | ||
readonly _dd: { | ||
/** | ||
* Distance between the top and the lowest point reached on this view (in pixels) | ||
* Version of the update of the view event | ||
*/ | ||
readonly max_depth: number | ||
readonly document_version: number | ||
/** | ||
* Page scroll top (scrolled distance) when the maximum scroll depth was reached for this view (in pixels) | ||
* List of the page states during the view | ||
*/ | ||
readonly max_depth_scroll_top: number | ||
readonly page_states?: { | ||
/** | ||
* Page state name | ||
*/ | ||
readonly state: 'active' | 'passive' | 'hidden' | 'frozen' | 'terminated' | ||
/** | ||
* Duration in ns between start of the view and start of the page state | ||
*/ | ||
readonly start: number | ||
[k: string]: unknown | ||
}[] | ||
/** | ||
* Maximum page scroll height (total height) for this view (in pixels) | ||
* Debug metadata for Replay Sessions | ||
*/ | ||
readonly max_scroll_height: number | ||
replay_stats?: { | ||
/** | ||
* The number of records produced during this view lifetime | ||
*/ | ||
records_count?: number | ||
/** | ||
* The number of segments sent during this view lifetime | ||
*/ | ||
segments_count?: number | ||
/** | ||
* The total size in bytes of the segments sent during this view lifetime | ||
*/ | ||
segments_total_raw_size?: number | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Duration between the view start and the time the max scroll height was reached for this view (in nanoseconds) | ||
* Subset of the SDK configuration options in use during its execution | ||
*/ | ||
readonly max_scroll_height_time: number | ||
readonly configuration?: { | ||
/** | ||
* Whether session replay recording configured to start manually | ||
*/ | ||
readonly start_session_replay_recording_manually?: boolean | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Display properties | ||
*/ | ||
readonly display?: { | ||
/** | ||
* Scroll properties | ||
*/ | ||
readonly scroll?: { | ||
/** | ||
* Distance between the top and the lowest point reached on this view (in pixels) | ||
*/ | ||
readonly max_depth: number | ||
/** | ||
* Page scroll top (scrolled distance) when the maximum scroll depth was reached for this view (in pixels) | ||
*/ | ||
readonly max_depth_scroll_top: number | ||
/** | ||
* Maximum page scroll height (total height) for this view (in pixels) | ||
*/ | ||
readonly max_scroll_height: number | ||
/** | ||
* Duration between the view start and the time the max scroll height was reached for this view (in nanoseconds) | ||
*/ | ||
readonly max_scroll_height_time: number | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
} | ||
@@ -939,2 +935,6 @@ /** | ||
/** | ||
* Generated unique ID of the application build. Unlike version or build_version this field is not meant to be coming from the user, but rather generated by the tooling for each build. | ||
*/ | ||
readonly build_id?: string | ||
/** | ||
* Session properties | ||
@@ -1151,2 +1151,13 @@ */ | ||
plan?: 1 | 2 | ||
/** | ||
* The precondition that led to the creation of the session | ||
*/ | ||
readonly session_precondition?: | ||
| 'user_app_launch' | ||
| 'inactivity_timeout' | ||
| 'max_duration' | ||
| 'background_launch' | ||
| 'prewarm' | ||
| 'from_non_interactive_session' | ||
| 'explicit_stop' | ||
[k: string]: unknown | ||
@@ -1183,2 +1194,28 @@ } | ||
/** | ||
* View Container schema for views that are nested (webviews in mobile) | ||
*/ | ||
export interface ViewContainerSchema { | ||
/** | ||
* View Container properties (view wrapping the current view) | ||
*/ | ||
readonly container?: { | ||
/** | ||
* Attributes of the view's container | ||
*/ | ||
readonly view: { | ||
/** | ||
* ID of the parent view | ||
*/ | ||
readonly id: string | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Source of the parent view | ||
*/ | ||
readonly source: 'android' | 'ios' | 'browser' | 'flutter' | 'react-native' | 'roku' | ||
[k: string]: unknown | ||
} | ||
[k: string]: unknown | ||
} | ||
/** | ||
* Schema of all properties of events that can have parent actions | ||
@@ -1185,0 +1222,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
1201717
21903
+ Added@datadog/browser-core@5.6.0(transitive)
- Removed@datadog/browser-core@5.5.1(transitive)
Updated@datadog/browser-core@5.6.0