From 39dbf5df26c18f4c290ad12a4341e279327433df Mon Sep 17 00:00:00 2001 From: Barry Pollard Date: Wed, 1 Mar 2023 15:13:59 +0000 Subject: [PATCH] Add Server Timing information to docs (#324) * Add Server Timing information to docs * Review feedback --- README.md | 11 +++++++---- src/types/fcp.ts | 3 ++- src/types/lcp.ts | 3 ++- src/types/ttfb.ts | 5 +++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 429e0e9b..37bc9252 100644 --- a/README.md +++ b/README.md @@ -1018,7 +1018,8 @@ interface FCPAttribution { fcpEntry?: PerformancePaintTiming; /** * The `navigation` entry of the current page, which is useful for diagnosing - * general page load issues. + * general page load issues. This can be used to access `serverTiming` for example: + * navigationEntry?.serverTiming */ navigationEntry?: PerformanceNavigationTiming | NavigationTimingPolyfillEntry; } @@ -1129,7 +1130,8 @@ interface LCPAttribution { elementRenderDelay: number; /** * The `navigation` entry of the current page, which is useful for diagnosing - * general page load issues. + * general page load issues. This can be used to access `serverTiming` for example: + * navigationEntry?.serverTiming */ navigationEntry?: PerformanceNavigationTiming | NavigationTimingPolyfillEntry; /** @@ -1169,8 +1171,9 @@ interface TTFBAttribution { */ requestTime: number; /** - * The `PerformanceNavigationTiming` entry used to determine TTFB (or the - * polyfill entry in browsers that don't support Navigation Timing). + * The `navigation` entry of the current page, which is useful for diagnosing + * general page load issues. This can be used to access `serverTiming` for example: + * navigationEntry?.serverTiming */ navigationEntry?: PerformanceNavigationTiming | NavigationTimingPolyfillEntry; } diff --git a/src/types/fcp.ts b/src/types/fcp.ts index df1a78cc..b7755629 100644 --- a/src/types/fcp.ts +++ b/src/types/fcp.ts @@ -52,7 +52,8 @@ export interface FCPAttribution { fcpEntry?: PerformancePaintTiming; /** * The `navigation` entry of the current page, which is useful for diagnosing - * general page load issues. + * general page load issues. This can be used to access `serverTiming` for example: + * navigationEntry?.serverTiming */ navigationEntry?: PerformanceNavigationTiming | NavigationTimingPolyfillEntry; } diff --git a/src/types/lcp.ts b/src/types/lcp.ts index d36b860a..b2418dbe 100644 --- a/src/types/lcp.ts +++ b/src/types/lcp.ts @@ -66,7 +66,8 @@ export interface LCPAttribution { elementRenderDelay: number; /** * The `navigation` entry of the current page, which is useful for diagnosing - * general page load issues. + * general page load issues. This can be used to access `serverTiming` for example: + * navigationEntry?.serverTiming */ navigationEntry?: PerformanceNavigationTiming | NavigationTimingPolyfillEntry; /** diff --git a/src/types/ttfb.ts b/src/types/ttfb.ts index 14208160..5b7b62b5 100644 --- a/src/types/ttfb.ts +++ b/src/types/ttfb.ts @@ -52,8 +52,9 @@ export interface TTFBAttribution { */ requestTime: number; /** - * The `PerformanceNavigationTiming` entry used to determine TTFB (or the - * polyfill entry in browsers that don't support Navigation Timing). + * The `navigation` entry of the current page, which is useful for diagnosing + * general page load issues. This can be used to access `serverTiming` for example: + * navigationEntry?.serverTiming */ navigationEntry?: PerformanceNavigationTiming | NavigationTimingPolyfillEntry; }