@@ -198,6 +198,14 @@ export interface RumInitConfiguration extends InitConfiguration {
198198 */
199199 trackLongTasks ?: boolean | undefined
200200
201+ /**
202+ * Enables early request collection before resource timing entries are available.
203+ *
204+ * @category Data Collection
205+ * @defaultValue false
206+ */
207+ trackEarlyRequests ?: boolean | undefined
208+
201209 /**
202210 * List of plugins to enable. The plugins API is unstable and experimental, and may change without
203211 * notice. Please use only plugins provided by Datadog matching the version of the SDK you are
@@ -258,10 +266,12 @@ export interface RumConfiguration extends Configuration {
258266 trackResources : boolean
259267 trackLongTasks : boolean
260268 trackBfcacheViews : boolean
269+ trackEarlyRequests : boolean
261270 subdomain ?: string
262271 customerDataTelemetrySampleRate : number
263272 initialViewMetricsTelemetrySampleRate : number
264273 replayTelemetrySampleRate : number
274+ remoteConfigurationTelemetrySampleRate : number
265275 traceContextInjection : TraceContextInjection
266276 plugins : RumPlugin [ ]
267277 trackFeatureFlagsForEvents : FeatureFlagsForEvents [ ]
@@ -330,6 +340,7 @@ export function validateAndBuildRumConfiguration(
330340 trackResources : ! ! ( initConfiguration . trackResources ?? true ) ,
331341 trackLongTasks : ! ! ( initConfiguration . trackLongTasks ?? true ) ,
332342 trackBfcacheViews : ! ! initConfiguration . trackBfcacheViews ,
343+ trackEarlyRequests : ! ! initConfiguration . trackEarlyRequests ,
333344 subdomain : initConfiguration . subdomain ,
334345 defaultPrivacyLevel : objectHasValue ( DefaultPrivacyLevel , initConfiguration . defaultPrivacyLevel )
335346 ? initConfiguration . defaultPrivacyLevel
@@ -338,6 +349,7 @@ export function validateAndBuildRumConfiguration(
338349 customerDataTelemetrySampleRate : 1 ,
339350 initialViewMetricsTelemetrySampleRate : 1 ,
340351 replayTelemetrySampleRate : 1 ,
352+ remoteConfigurationTelemetrySampleRate : 1 ,
341353 traceContextInjection : objectHasValue ( TraceContextInjection , initConfiguration . traceContextInjection )
342354 ? initConfiguration . traceContextInjection
343355 : TraceContextInjection . SAMPLED ,
@@ -468,6 +480,7 @@ export function serializeRumConfiguration(configuration: RumInitConfiguration) {
468480 track_resources : configuration . trackResources ,
469481 track_long_task : configuration . trackLongTasks ,
470482 track_bfcache_views : configuration . trackBfcacheViews ,
483+ track_early_requests : configuration . trackEarlyRequests ,
471484 plugins : configuration . plugins ?. map ( ( plugin ) => ( {
472485 name : plugin . name ,
473486 ...plugin . getConfigurationTelemetry ?.( ) ,
0 commit comments