datadog-ux-utils Documentation - v1.0.0
    Preparing search index...

    Type Alias TrackNetworkOptions

    Configuration for network tracking behavior.

    type TrackNetworkOptions = {
        reportChanges?: boolean;
        changeSampleRate?: number;
        constrained?: Partial<ConstrainedHeuristics>;
        debounceMs?: number;
        setGlobalContext?: boolean;
    }
    Index

    Properties

    reportChanges?: boolean

    Emit a Datadog action when network conditions change. Default: true (sampled at changeSampleRate).

    changeSampleRate?: number

    % sample rate for change events (0–100). Default: 25. Only applies if reportChanges is true.

    constrained?: Partial<ConstrainedHeuristics>

    Treat the following as "constrained" for isConstrainedNetwork(). Default: { effectiveTypes: ["slow-2g", "2g"], maxDownlinkMbps: 0.8, minRttMs: 300, respectSaveData: true }

    debounceMs?: number

    Debounce window in ms for high-churn changes on some devices. Default: 150 ms.

    setGlobalContext?: boolean

    Whether to update Datadog global context on every change. Default: true. Context keys: network_effectiveType, network_downlinkMbps, network_rttMs, network_saveData, network_online, network_type