monitor-api - v1.8.0
    Preparing search index...

    Interface WebVitalMetric<N>

    Serializable Web Vitals metric captured from the web-vitals package.

    interface WebVitalMetric<N extends WebVitalName = WebVitalName> {
        attribution?: WebVitalAttributionMap[N];
        delta: number;
        id: string;
        name: N;
        navigationId: number;
        navigationType: string;
        navigationURL: string | null;
        rating: "good" | "needs-improvement" | "poor";
        timestamp: number;
        value: number;
    }

    Type Parameters

    Index

    Properties

    attribution?: WebVitalAttributionMap[N]

    Diagnostic breakdown, present only when the collector's attribution option is enabled. Selectors and URLs can reveal page structure or user data; see PRIVACY.md.

    delta: number

    Delta from the previous report for the same metric instance.

    id: string

    Stable id generated by web-vitals for deduplication.

    name: N

    Metric name.

    navigationId: number

    Identifies the navigation the metric belongs to. Increases with each soft navigation, so reports can be grouped per page view.

    navigationType: string

    Navigation type associated with the metric, such as navigate, reload, back-forward-cache or, with softNavigations, soft-navigation.

    navigationURL: string | null

    URL of the navigation the metric belongs to, capped at 500 characters, or null when the browser does not report one. Mostly relevant for soft navigations; see PRIVACY.md.

    rating: "good" | "needs-improvement" | "poor"

    Rating based on Web Vitals thresholds.

    timestamp: number

    Unix timestamp in milliseconds for when the metric was recorded.

    value: number

    Current metric value. Units depend on the metric: CLS is unitless, others are milliseconds.