Skip to content

Commit 4f7da97

Browse files
committed
♻️ update schemas
1 parent f3c22e7 commit 4f7da97

File tree

2 files changed

+111
-40
lines changed

2 files changed

+111
-40
lines changed

packages/core/src/domain/telemetry/telemetryEvent.types.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ export type TelemetryConfigurationEvent = CommonTelemetryProperties & {
209209
* Whether the allowed tracing urls list is used
210210
*/
211211
use_allowed_tracing_urls?: boolean
212+
/**
213+
* Whether the allowed GraphQL urls list is used
214+
*/
215+
use_allowed_graph_ql_urls?: boolean
216+
/**
217+
* Whether GraphQL payload tracking is used for at least one GraphQL endpoint
218+
*/
219+
use_track_graph_ql_payload?: boolean
212220
/**
213221
* A list of selected tracing propagators
214222
*/
@@ -443,6 +451,22 @@ export type TelemetryConfigurationEvent = CommonTelemetryProperties & {
443451
* The variant of the SDK build (e.g., standard, lite, etc.).
444452
*/
445453
variant?: string
454+
/**
455+
* The id of the remote configuration
456+
*/
457+
remote_configuration_id?: string
458+
/**
459+
* Whether a proxy is used for remote configuration
460+
*/
461+
use_remote_configuration_proxy?: boolean
462+
/**
463+
* The percentage of sessions with Profiling enabled
464+
*/
465+
profiling_sample_rate?: number
466+
/**
467+
* Whether trace baggage is propagated to child spans
468+
*/
469+
propagate_trace_baggage?: boolean
446470
[k: string]: unknown
447471
}
448472
[k: string]: unknown

packages/rum-core/src/rumEvent.types.ts

Lines changed: 87 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,44 +1288,7 @@ export type RumVitalEvent = CommonProperties &
12881288
* RUM event type
12891289
*/
12901290
readonly type: 'vital'
1291-
/**
1292-
* Vital properties
1293-
*/
1294-
readonly vital: {
1295-
/**
1296-
* Type of the vital
1297-
*/
1298-
readonly type: 'duration' | 'step'
1299-
/**
1300-
* UUID of the vital
1301-
*/
1302-
readonly id: string
1303-
/**
1304-
* Optional key to distinguish between multiple operations of the same name running in parallel (e.g., 'photo_upload' with keys 'profile_pic' vs 'cover')
1305-
*/
1306-
readonly parent_id?: string
1307-
/**
1308-
* Name of the vital, as it is also used as facet path for its value, it must contain only letters, digits, or the characters - _ . @ $
1309-
*/
1310-
readonly name?: string
1311-
/**
1312-
* Description of the vital. It can be used as a secondary identifier (URL, React component name...)
1313-
*/
1314-
readonly description?: string
1315-
/**
1316-
* Duration of the vital in nanoseconds
1317-
*/
1318-
readonly duration?: number
1319-
/**
1320-
* Type of the step that triggered the vital, if applicable
1321-
*/
1322-
readonly step_type?: 'start' | 'update' | 'retry' | 'end'
1323-
/**
1324-
* Reason for the failure of the step, if applicable
1325-
*/
1326-
readonly failure_reason?: 'error' | 'abandoned' | 'other'
1327-
[k: string]: unknown
1328-
}
1291+
readonly vital: DurationProperties | AppLaunchProperties | FeatureOperationProperties
13291292
/**
13301293
* Internal properties
13311294
*/
@@ -1344,6 +1307,90 @@ export type RumVitalEvent = CommonProperties &
13441307
}
13451308
[k: string]: unknown
13461309
}
1310+
/**
1311+
* Duration properties of a Vital event
1312+
*/
1313+
export type DurationProperties = VitalCommonProperties & {
1314+
/**
1315+
* Type of the vital.
1316+
*/
1317+
readonly type: 'duration'
1318+
/**
1319+
* Duration of the vital in nanoseconds.
1320+
*/
1321+
readonly duration: number
1322+
[k: string]: unknown
1323+
}
1324+
/**
1325+
* Schema of common properties for a Vital event
1326+
*/
1327+
export type VitalCommonProperties = {
1328+
/**
1329+
* UUID of the vital
1330+
*/
1331+
readonly id: string
1332+
/**
1333+
* Name of the vital, as it is also used as facet path for its value, it must contain only letters, digits, or the characters - _ . @ $
1334+
*/
1335+
readonly name?: string
1336+
/**
1337+
* Description of the vital. It can be used as a secondary identifier (URL, React component name...)
1338+
*/
1339+
readonly description?: string
1340+
[k: string]: unknown
1341+
}
1342+
/**
1343+
* Schema for app launch metrics.
1344+
*/
1345+
export type AppLaunchProperties = VitalCommonProperties & {
1346+
/**
1347+
* Type of the vital.
1348+
*/
1349+
readonly type: 'app_launch'
1350+
/**
1351+
* The metric of the app launch.
1352+
*/
1353+
readonly app_launch_metric: 'ttid' | 'ttfd'
1354+
/**
1355+
* Duration of the vital in nanoseconds.
1356+
*/
1357+
readonly duration: number
1358+
/**
1359+
* The type of the app launch.
1360+
*/
1361+
readonly startup_type?: 'cold_start' | 'warm_start'
1362+
/**
1363+
* Whether the app launch was prewarmed.
1364+
*/
1365+
readonly is_prewarmed?: boolean
1366+
/**
1367+
* If the app launch had a saved instance state bundle.
1368+
*/
1369+
readonly has_saved_instance_state_bundle?: boolean
1370+
[k: string]: unknown
1371+
}
1372+
/**
1373+
* Schema for a feature operation.
1374+
*/
1375+
export type FeatureOperationProperties = VitalCommonProperties & {
1376+
/**
1377+
* Type of the vital.
1378+
*/
1379+
readonly type: 'operation_step'
1380+
/**
1381+
* Optional key to distinguish between multiple operations of the same name running in parallel (e.g., 'photo_upload' with keys 'profile_pic' vs 'cover')
1382+
*/
1383+
readonly operation_key?: string
1384+
/**
1385+
* Type of the step that triggered the vital, if applicable
1386+
*/
1387+
readonly step_type?: 'start' | 'update' | 'retry' | 'end'
1388+
/**
1389+
* Reason for the failure of the step, if applicable
1390+
*/
1391+
readonly failure_reason?: 'error' | 'abandoned' | 'other'
1392+
[k: string]: unknown
1393+
}
13471394

13481395
/**
13491396
* Schema of common properties of RUM events
@@ -1806,7 +1853,7 @@ export interface StreamSchema {
18061853
*/
18071854
bitrate?: number
18081855
/**
1809-
* How long is the content (VOD only)
1856+
* How long is the content (VOD only) (in ms)
18101857
*/
18111858
readonly duration?: number
18121859
/**
@@ -1826,7 +1873,7 @@ export interface StreamSchema {
18261873
*/
18271874
timestamp?: number
18281875
/**
1829-
* how much did the media progress since the last context update
1876+
* how much did the media progress since the last context update (in ms)
18301877
*/
18311878
watch_time?: number
18321879
[k: string]: unknown

0 commit comments

Comments
 (0)