UNPKG

@coralogix/browser

Version:

Official Coralogix SDK for browsers

32 lines (31 loc) 1.73 kB
import { Browser, Device, OS, PageContext, PatternReplacement, UrlBlueprinter, WebVitalsRating } from '../types'; import { Attributes } from '@opentelemetry/api'; export declare const supportedPerformanceTypes: Set<string>; export declare function valueEndWithOrInclude(value: string, extensions: string[]): boolean; export declare function getInstrumentationConfig<T>(value: T | boolean | undefined, defaults?: T, defaultDisable?: T | boolean): T | false; export declare const hrTimeToMilliseconds: ([seconds, nanoseconds]: [number, number]) => number; export declare const isNetworkError: (status?: number) => boolean; export declare const getUrlFragments: (url: string) => string; export declare function parseUserAgent(userAgent: string): { browser: Browser; browserVersion: string; os: OS; osVersion: string; device: Device; }; export declare function calculateTotalBlockingTime(list: PerformanceEntry[]): number; export declare function generateWebVitalUniqueID(): string; export declare function rateForTBTMetricValue(value: number): WebVitalsRating; export declare function flattenAttributes(attributes: Attributes): Attributes; export declare const getCircularReplacer: () => ((key: any, value: any) => undefined | any); export declare function replacePatternsInUrl({ patterns, url, }: { patterns: PatternReplacement[]; url: string; }): string; export declare function applyUrlBluePrinters({ url, blueprinters, }: { url: string; blueprinters?: UrlBlueprinter[]; }): string; export declare function resolvePageContext(url: string): PageContext; export declare function deepClone<T>(obj: T): T; export declare function partition<T>(array: T[], predicate: (value: T) => boolean): [T[], T[]];