import { BrowserConfig, ReactIntegration, Faro } from '@grafana/faro-react'; export { FaroRoute, FaroRoutes, withFaroRouterInstrumentation } from '@grafana/faro-react'; import { BrowserHistory } from 'history'; interface FaroConfig { faroUrl: string; faroKey: string; } type Sanitizer = (beacon: Record) => Record; declare class FaroService { private instance; private sanitizers; private _isInitialized; init({ faroKey, faroUrl, transports, instrumentations, beforeSend, routerAdapter, ...rest }: FaroConfig & BrowserConfig & { routerAdapter?: ReactIntegration; }): Faro; addSanitizer(sanitizer: Sanitizer | Sanitizer[]): void; get isInitialized(): boolean; getInstance(): Faro; private createOtlpTransforms; destroy(): void; } type CustomMetricBase = { timestamp: number; name: string; value: string | number; description: string; unit: MetricUnit; labels?: MetricLabel; type: MetricType; status?: string; result?: string; buckets?: (number | string)[]; }; type MetricUnit = 'BYTES' | 'MILLISECONDS' | 'SECONDS' | 'REQUESTS' | 'ERRORS' | 'OPERATIONS' | 'EVENTS' | 'UNITLESS'; type MetricLabel = Record>; type MetricType = 'histogram' | 'counter' | 'gauge'; declare const MEASUREMENT_KEYS: { readonly DESCRIPTION: "measurement.description"; readonly UNIT: "measurement.unit"; readonly TYPE: "measurement.metric.type"; readonly LABELS: "measurement.labels"; readonly STATUS: "measurement.status"; readonly RESULT: "measurement.result"; readonly BUCKETS: "measurement.buckets"; }; declare class MetricsService { private faroService; constructor(faroService: FaroService); sendCustomMetric({ name, value, ...rest }: CustomMetricBase): void; } type RouterMajorVersion = 4 | 5 | 6 | 7 | null; type ReactIntegrationSettings = { adapter: ReactIntegration; version: RouterMajorVersion; dependencies: Record; }; type GetRouterAdapterParams = { history: BrowserHistory; Route: any; }; declare function getRouterAdapter(version: RouterMajorVersion, params?: GetRouterAdapterParams): ReactIntegrationSettings; export { FaroService, MEASUREMENT_KEYS, MetricsService, getRouterAdapter }; export type { CustomMetricBase, MetricLabel, MetricType, MetricUnit };