Skip to content

Commit

Permalink
Mark Web Vitals attribution fields as optional where appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
sethfowler-datadog committed Dec 24, 2024
1 parent 67601c9 commit 8b4d9a0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions lib/cjs/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1506,11 +1506,11 @@ export interface ViewPerformanceData {
/**
* Timestamp in ns of the largest layout shift contributing to CLS
*/
readonly timestamp: number;
readonly timestamp?: number;
/**
* CSS selector path of the first element (in document order) of the largest layout shift contributing to CLS
*/
readonly target_selector: string;
readonly target_selector?: string;
[k: string]: unknown;
};
/**
Expand Down Expand Up @@ -1538,7 +1538,7 @@ export interface ViewPerformanceData {
/**
* CSS selector path of the first input target element
*/
readonly target_selector: string;
readonly target_selector?: string;
[k: string]: unknown;
};
/**
Expand All @@ -1552,11 +1552,11 @@ export interface ViewPerformanceData {
/**
* Timestamp in ns of the start of the INP interaction
*/
readonly timestamp: number;
readonly timestamp?: number;
/**
* CSS selector path of the interacted element for the INP interaction
*/
readonly target_selector: string;
readonly target_selector?: string;
[k: string]: unknown;
};
/**
Expand All @@ -1570,7 +1570,7 @@ export interface ViewPerformanceData {
/**
* CSS selector path of the largest contentful paint element
*/
readonly target_selector: string;
readonly target_selector?: string;
[k: string]: unknown;
};
[k: string]: unknown;
Expand Down
12 changes: 6 additions & 6 deletions lib/esm/generated/rum.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1506,11 +1506,11 @@ export interface ViewPerformanceData {
/**
* Timestamp in ns of the largest layout shift contributing to CLS
*/
readonly timestamp: number;
readonly timestamp?: number;
/**
* CSS selector path of the first element (in document order) of the largest layout shift contributing to CLS
*/
readonly target_selector: string;
readonly target_selector?: string;
[k: string]: unknown;
};
/**
Expand Down Expand Up @@ -1538,7 +1538,7 @@ export interface ViewPerformanceData {
/**
* CSS selector path of the first input target element
*/
readonly target_selector: string;
readonly target_selector?: string;
[k: string]: unknown;
};
/**
Expand All @@ -1552,11 +1552,11 @@ export interface ViewPerformanceData {
/**
* Timestamp in ns of the start of the INP interaction
*/
readonly timestamp: number;
readonly timestamp?: number;
/**
* CSS selector path of the interacted element for the INP interaction
*/
readonly target_selector: string;
readonly target_selector?: string;
[k: string]: unknown;
};
/**
Expand All @@ -1570,7 +1570,7 @@ export interface ViewPerformanceData {
/**
* CSS selector path of the largest contentful paint element
*/
readonly target_selector: string;
readonly target_selector?: string;
[k: string]: unknown;
};
[k: string]: unknown;
Expand Down
8 changes: 4 additions & 4 deletions schemas/rum/_view-performance-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cls": {
"type": "object",
"description": "Cumulative Layout Shift",
"required": ["score", "timestamp", "target_selector"],
"required": ["score"],
"properties": {
"score": {
"type": "number",
Expand Down Expand Up @@ -51,7 +51,7 @@
"fid": {
"type": "object",
"description": "First Input Delay",
"required": ["duration", "timestamp", "target_selector"],
"required": ["duration", "timestamp"],
"properties": {
"duration": {
"type": "integer",
Expand Down Expand Up @@ -79,7 +79,7 @@
"inp": {
"type": "object",
"description": "Interaction to Next Paint",
"required": ["duration", "timestamp", "target_selector"],
"required": ["duration"],
"properties": {
"duration": {
"type": "integer",
Expand Down Expand Up @@ -107,7 +107,7 @@
"lcp": {
"type": "object",
"description": "Largest Contentful Paint",
"required": ["timestamp", "target_selector"],
"required": ["timestamp"],
"properties": {
"timestamp": {
"type": "integer",
Expand Down

0 comments on commit 8b4d9a0

Please sign in to comment.