browser-sdk

Home > @datadog/browser-rum > RumResourceEvent

RumResourceEvent type

Schema of all properties of a Resource event

Signature:

export type RumResourceEvent = CommonProperties & ActionChildProperties & ViewContainerSchema & {
 readonly type: 'resource';
 readonly resource: {
 readonly id?: string;
 readonly type: 'document' | 'xhr' | 'beacon' | 'fetch' | 'css' | 'js' | 'image' | 'font' | 'media' | 'other' | 'native';
 readonly method?: 'POST' | 'GET' | 'HEAD' | 'PUT' | 'DELETE' | 'PATCH' | 'TRACE' | 'OPTIONS' | 'CONNECT';
 url: string;
 readonly status_code?: number;
 readonly duration?: number;
 readonly size?: number;
 readonly encoded_body_size?: number;
 readonly decoded_body_size?: number;
 readonly transfer_size?: number;
 readonly render_blocking_status?: 'blocking' | 'non-blocking';
 readonly worker?: {
 readonly duration: number;
 readonly start: number;
 [k: string]: unknown;
 };
 readonly redirect?: {
 readonly duration: number;
 readonly start: number;
 [k: string]: unknown;
 };
 readonly dns?: {
 readonly duration: number;
 readonly start: number;
 [k: string]: unknown;
 };
 readonly connect?: {
 readonly duration: number;
 readonly start: number;
 [k: string]: unknown;
 };
 readonly ssl?: {
 readonly duration: number;
 readonly start: number;
 [k: string]: unknown;
 };
 readonly first_byte?: {
 readonly duration: number;
 readonly start: number;
 [k: string]: unknown;
 };
 readonly download?: {
 readonly duration: number;
 readonly start: number;
 [k: string]: unknown;
 };
 readonly protocol?: string;
 readonly delivery_type?: 'cache' | 'navigational-prefetch' | 'other';
 readonly provider?: {
 readonly domain?: string;
 readonly name?: string;
 readonly type?: 'ad' | 'advertising' | 'analytics' | 'cdn' | 'content' | 'customer-success' | 'first party' | 'hosting' | 'marketing' | 'other' | 'social' | 'tag-manager' | 'utility' | 'video';
 [k: string]: unknown;
 };
 readonly graphql?: {
 readonly operationType: 'query' | 'mutation' | 'subscription';
 readonly operationName?: string;
 payload?: string;
 variables?: string;
 [k: string]: unknown;
 };
 [k: string]: unknown;
 };
 readonly _dd?: {
 readonly span_id?: string;
 readonly trace_id?: string;
 readonly rule_psr?: number;
 readonly discarded?: boolean;
 [k: string]: unknown;
 };
 [k: string]: unknown;
};

References: CommonProperties