@coralogix/browser
Version:
Official Coralogix SDK for browsers
136 lines (135 loc) • 5.67 kB
TypeScript
import { CoralogixBrowserSdkConfig, InputType } from './types';
import { CoralogixErrorInstrumentation } from './instrumentations/CoralogixErrorInstrumentation';
import { CoralogixFetchInstrumentation } from './instrumentations/network/CoralogixFetchInstrumentation';
import { CoralogixXhrInstrumentation } from './instrumentations/network/CoralogixXhrInstrumentation';
import { CoralogixCustomLogInstrumentation } from './instrumentations/CoralogixCustomLogInstrumentation';
import { CoralogixWebVitalsInstrumentation } from './instrumentations/CoralogixWebVitalsInstrumentation';
import { CoralogixLongTaskInstrumentation } from './instrumentations/CoralogixLongTaskInstrumentation';
import { CoralogixResourcesInstrumentation } from './instrumentations/CoralogixResourcesInstrumentation';
import { CoralogixUserInteractionInstrumentation } from './instrumentations/user-interaction/CoralogixUserInteractionInstrumentation';
import { CoralogixMemoryUsageInstrumentation } from './instrumentations/memory-usage';
import { CoralogixScreenshotInstrumentation } from './instrumentations/screenshot/CoralogixScreenshotInstrumentation';
import { CoralogixCustomMeasurementInstrumentation } from './instrumentations/custom-measurements';
import { CoralogixInternalInstrumentation } from './instrumentations/CoralogixInternalInstrumentation';
import { CoralogixDOMInstrumentation } from './instrumentations/CoralogixDOMInstrumentation';
export declare const CORALOGIX_LOGS_URL_SUFFIX = "/browser/v1beta/logs";
export declare const CORALOGIX_RECORDING_URL_SUFFIX = "/sessionrecording";
export declare const MAX_EXPORT_BATCH_SIZE = 50;
export declare const MAX_INTERACTION_ELEMENT_SIZE = 1024;
export declare const MAX_CHARACTERS = 1024;
export declare const SCHEDULE_DELAY_MILLIS: number;
export declare const REQUIRED_CONFIG_KEYS: Array<keyof CoralogixBrowserSdkConfig>;
export declare const SDK_CONFIG_KEY = "sdkConfig";
export declare const ID_MASK_KEY = "{id}";
export declare const UUID_REGEX: RegExp;
export declare const NANOID_REGEX: RegExp;
export declare const PAGE_URL_LABEL_PROVIDERS_KEY = "PAGE_URL_LABEL_PROVIDERS";
export declare const NETWORK_URL_LABEL_PROVIDERS_KEY = "NETWORK_URL_LABEL_PROVIDERS";
export declare const RUM_INTERNAL_DATA_KEY = "rumInternalData";
export declare const MASKED_TEXT = "***";
export declare const MASK_CLASS_DEFAULT = "cx-mask";
export declare const MASK_INPUT_TYPES_DEFAULT: InputType[];
export declare const OPTIONS_DEFAULTS: Partial<CoralogixBrowserSdkConfig>;
export declare const INSTRUMENTATIONS: readonly [{
readonly Instrument: typeof CoralogixErrorInstrumentation;
readonly confKey: "errors";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixFetchInstrumentation;
readonly confKey: "fetch";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixXhrInstrumentation;
readonly confKey: "xhr";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixCustomLogInstrumentation;
readonly confKey: "custom";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixUserInteractionInstrumentation;
readonly confKey: "interactions";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixWebVitalsInstrumentation;
readonly confKey: "web_vitals";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixLongTaskInstrumentation;
readonly confKey: "long_tasks";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixResourcesInstrumentation;
readonly confKey: "resources";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixInternalInstrumentation;
readonly confKey: "internal";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixDOMInstrumentation;
readonly confKey: "dom";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixCustomMeasurementInstrumentation;
readonly confKey: "custom_measurement";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixMemoryUsageInstrumentation;
readonly confKey: "memory_usage";
readonly disable: false;
}, {
readonly Instrument: typeof CoralogixScreenshotInstrumentation;
readonly confKey: "screenshot";
readonly disable: false;
}];
export declare const CoralogixAttributes: {
USER_AGENT: string;
LOCATION_HREF: string;
EVENT_TYPE: string;
SEVERITY: string;
APPLICATION_CONTEXT: string;
USER_CONTEXT: string;
CUSTOM_MEASUREMENT_CONTEXT: string;
MEMORY_USAGE_CONTEXT: string;
COUNTRY: string;
SOURCE: string;
ERROR: {
TYPE: string;
STACK: string;
MESSAGE: string;
DATA: string;
};
LOG: string;
CUSTOM_LABELS: string;
ENVIRONMENT: string;
INTERACTION_EVENT_NAME: string;
ELEMENT_INNER_TEXT: string;
ELEMENT_INNER_HTML: string;
ELEMENT_ID: string;
ELEMENT_CLASSES: string;
TARGET_XPATH: string;
TARGET_ELEMENT: string;
TARGET_ELEMENT_TYPE: string;
TIMESTAMP: string;
INTERNAL: string;
PAGE_CONTEXT: string;
IS_NAVIGATION_EVENT: string;
SCREENSHOT_CONTEXT: string;
};
export declare const CoralogixDomainsApiUrlMap: {
EU1: string;
EU2: string;
US1: string;
US2: string;
AP1: string;
AP2: string;
AP3: string;
STAGING: string;
};
export declare const PROXY_CX_FORWARD_PARAMETER = "cxforward";
export declare const CX_MAPPED_SPAN = "cx_mapped_span";
export declare const BASE_PATH = "/";
export declare const HASH_SEPARATOR = "#";
export declare const PARAMS_SEPARATOR = "?";
export declare const PROTOCOL_SEPARATOR = "://";