lib/webVitals/webVital
Esta página aún no está disponible en tu idioma.
Functions
Section titled “Functions”getWebVitals()
Section titled “getWebVitals()”function getWebVitals(): Promise<GetWebVitalsData>
Defined in: studiocms/packages/studiocms/src/lib/webVitals/webVital.ts:43
Fetches web vitals data from the Astro database.
Returns
Section titled “Returns”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.
Throws
Section titled “Throws”If there is an issue with fetching or processing the web vitals data.
References
Section titled “References”GetWebVitalsData
Section titled “GetWebVitalsData”Re-exports GetWebVitalsData
IntermediateWebVitalsRouteSummary
Section titled “IntermediateWebVitalsRouteSummary”Re-exports IntermediateWebVitalsRouteSummary
MetricStats
Section titled “MetricStats”Re-exports MetricStats
WebVitalsMetricSummary
Section titled “WebVitalsMetricSummary”Re-exports WebVitalsMetricSummary
WebVitalsResponseItem
Section titled “WebVitalsResponseItem”Re-exports WebVitalsResponseItem
WebVitalsRouteSummary
Section titled “WebVitalsRouteSummary”Re-exports WebVitalsRouteSummary
WebVitalsSummary
Section titled “WebVitalsSummary”Re-exports WebVitalsSummary