lib/webVitals/webVital
Functions
'Read the “', Functions, '” section'getWebVitals()
'Read the “', getWebVitals(), '” section'function getWebVitals(): Promise<GetWebVitalsData>
Defined in: studiocms/packages/studiocms/src/lib/webVitals/webVital.ts:43
Fetches web vitals data from the Astro database.
Promise
<GetWebVitalsData
>
A promise that resolves to an object containing web vitals data.
The returned object contains the following properties:
raw
: The raw web vitals data.routeSummary
: A summary of web vitals data by route.summary
: A general summary of web vitals data.twentyFourHours
: An object containing web vitals data for the last 24 hours, withsummary
androuteSummary
properties.sevenDays
: An object containing web vitals data for the last 7 days, withsummary
androuteSummary
properties.thirtyDays
: An object containing web vitals data for the last 30 days, withsummary
androuteSummary
properties.
If the web vitals metric table is not found in the Astro database, or if an error occurs, an empty return object is returned.
If there is an issue with fetching or processing the web vitals data.
References
'Read the “', References, '” section'GetWebVitalsData
'Read the “', GetWebVitalsData, '” section'Re-exports GetWebVitalsData
IntermediateWebVitalsRouteSummary
'Read the “', IntermediateWebVitalsRouteSummary, '” section'Re-exports IntermediateWebVitalsRouteSummary
MetricStats
'Read the “', MetricStats, '” section'Re-exports MetricStats
WebVitalsMetricSummary
'Read the “', WebVitalsMetricSummary, '” section'Re-exports WebVitalsMetricSummary
WebVitalsResponseItem
'Read the “', WebVitalsResponseItem, '” section'Re-exports WebVitalsResponseItem
WebVitalsRouteSummary
'Read the “', WebVitalsRouteSummary, '” section'Re-exports WebVitalsRouteSummary
WebVitalsSummary
'Read the “', WebVitalsSummary, '” section'Re-exports WebVitalsSummary