Skip to content

Commit e1a3ffb

Browse files
authored
feat: update view schema to support LCP subparts (#340)
feat: update view schema to support LCP subparts fix: format feat: build types feat: stop duplicating first_byte in LCP subparts Co-authored-by: hugo.garridoysaez <hugo.garridoysaez@datadoghq.com>
1 parent 846ac60 commit e1a3ffb

3 files changed

Lines changed: 61 additions & 0 deletions

File tree

lib/cjs/generated/rum.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,24 @@ export interface ViewPerformanceData {
19531953
* URL of the largest contentful paint element
19541954
*/
19551955
resource_url?: string;
1956+
/**
1957+
* Sub-parts of the LCP
1958+
*/
1959+
sub_parts?: {
1960+
/**
1961+
* Time between first_byte and the loading start of the resource associated with the LCP
1962+
*/
1963+
readonly load_delay: number;
1964+
/**
1965+
* Time to takes to load the resource attached to the LCP
1966+
*/
1967+
readonly load_time: number;
1968+
/**
1969+
* Time between the LCP resource finishes loading and the LCP element is fully rendered
1970+
*/
1971+
readonly render_delay: number;
1972+
[k: string]: unknown;
1973+
};
19561974
[k: string]: unknown;
19571975
};
19581976
/**

lib/esm/generated/rum.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,24 @@ export interface ViewPerformanceData {
19531953
* URL of the largest contentful paint element
19541954
*/
19551955
resource_url?: string;
1956+
/**
1957+
* Sub-parts of the LCP
1958+
*/
1959+
sub_parts?: {
1960+
/**
1961+
* Time between first_byte and the loading start of the resource associated with the LCP
1962+
*/
1963+
readonly load_delay: number;
1964+
/**
1965+
* Time to takes to load the resource attached to the LCP
1966+
*/
1967+
readonly load_time: number;
1968+
/**
1969+
* Time between the LCP resource finishes loading and the LCP element is fully rendered
1970+
*/
1971+
readonly render_delay: number;
1972+
[k: string]: unknown;
1973+
};
19561974
[k: string]: unknown;
19571975
};
19581976
/**

schemas/rum/_view-performance-schema.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,31 @@
134134
"type": "string",
135135
"description": "URL of the largest contentful paint element",
136136
"readOnly": false
137+
},
138+
"sub_parts": {
139+
"type": "object",
140+
"description": "Sub-parts of the LCP",
141+
"required": ["load_delay", "load_time", "render_delay"],
142+
"properties": {
143+
"load_delay": {
144+
"type": "integer",
145+
"description": "Time between first_byte and the loading start of the resource associated with the LCP",
146+
"minimum": 0,
147+
"readOnly": true
148+
},
149+
"load_time": {
150+
"type": "integer",
151+
"description": "Time to takes to load the resource attached to the LCP",
152+
"minimum": 0,
153+
"readOnly": true
154+
},
155+
"render_delay": {
156+
"type": "integer",
157+
"description": "Time between the LCP resource finishes loading and the LCP element is fully rendered",
158+
"minimum": 0,
159+
"readOnly": true
160+
}
161+
}
137162
}
138163
},
139164
"readOnly": true

0 commit comments

Comments
 (0)