import { OtherMetricsKeys } from "./OtherMetricsKeys"; import { bool, HashMap, u16, u32, Uuid } from "./_commons"; export interface PageVisitMetrics { /** * The browser id * Renamed to browser_id in metroplex */ br_id: Uuid; /** * The page visit id * Renamed to id in metroplex */ pv_id: Uuid; /** * Version of the client script deployed on our customers websites * Renamed to client_script_version in metroplex */ cv: u16; /** * The version of the payload. Set to 5 for now and sent by Collect * Renamed to metrics_data_version in metroplex */ v: u16; /** The expected length of the video for the page visit */ exp_vid_len: u32; /** The expected max video sequence number for the page visit */ exp_vf_seq: u32; /** The expected number of parts that comprise this page visit */ exp_pc_seq: u32; /** The expected max http data sequence number for the page visit */ exp_http_seq?: u32; /** Whether the page visit was cut due to being too large */ did_cut_pv: bool; /** Whether the video was cut due to being too large */ did_cut_vid: bool; /** Whether the video recording was started */ did_start_vid?: bool; /** The number of clicks events in the video */ vid_clicks: u32; /** The number of click events registered for the page visit */ pv_clicks: u32; /** number of generated errors */ exp_err?: u32; /** number of generated http events */ exp_http?: u32; /** The URL of the current page, only used to extract the domain. */ on_url?: string; /** * The time that these metrics were created at * Renamed to timestamp in metroplex * Populated on Metroplex side */ ts?: never; /** The number of payloads collected */ http_payloads?: u32; /** The number of payloads dropped due to being too large */ http_drop_oversize?: u32; /** The number of payloads dropped due to being the wrong content type */ http_drop_type?: u32; /** The number of http data requests dropped due to being over the limit per pv */ http_over_limit?: u32; /** The total number of addCustomAttribute calls */ cust_attr_total?: u32; /** The number of addCustomAttribute failed calls */ cust_attr_fail?: u32; /** The number of how many custom attributes exist */ cust_attr_key?: u32; /** * Additional metrics, these are usually unfixable collect errors that we stopped logging, * but still want to get alerted if number of them spikes or trend changes. * Renamed to other_metrics in metroplex */ omm?: HashMap; }