import { ITracingService } from './interfaces/TracingService.types';
import { Span } from '@opentelemetry/api';
export interface TracingConfig {
    collectorUrl?: string;
    serviceName?: string;
    serviceVersion?: string;
    debug?: boolean;
    customerId?: string;
    tenantId?: string;
    environment?: string;
    propagateTraceHeaderCorsUrls?: (string | RegExp)[];
    enableAutoInstrumentation?: boolean;
}
export declare class TracingService implements ITracingService {
    private provider;
    private tracer;
    private sessionTraceId;
    private readonly collectorUrl;
    private readonly serviceName;
    private readonly serviceVersion;
    private readonly debug;
    private readonly customerId?;
    private readonly tenantId?;
    private readonly environment?;
    private readonly enableAutoInstrumentation;
    private spanProcessor;
    private parser;
    private geoCache;
    private geoCacheTimestamp;
    private readonly GEO_CACHE_DURATION_MS;
    constructor(config?: TracingConfig);
    initialize(): void;
    private initializeAutoInstrumentation;
    private getDeviceInfo;
    private getBrowserInfo;
    private getOSInfo;
    /**
     * Set the session trace ID from external source (license or component prop)
     * @param traceId - The trace ID to use for all spans (32 hex characters)
     */
    setSessionTraceId(traceId: string | null): void;
    /**
     * Get the current session trace ID
     */
    getSessionTraceId(): string | null;
    /**
     * Generate a random span ID (16 hex characters)
     */
    private generateSpanId;
    private getGeoLocation;
    startSpan(name: string, attributes?: Record<string, any>): Span;
    endSpan(span: Span): void;
    addSpanEvent(span: Span, name: string, attributes?: Record<string, any>): void;
    recordException(span: Span, error: Error): void;
    setSpanAttribute(span: Span, key: string, value: any): void;
    trace<T>(name: string, fn: () => T | Promise<T>, attributes?: Record<string, any>): Promise<T>;
    traceAsync<T>(name: string, fn: () => Promise<T>, attributes?: Record<string, any>): Promise<T>;
    /**
     * Flush all pending spans to the collector
     * Call this when capture/process is complete to send all traces
     */
    flush(): Promise<void>;
    cleanup(): Promise<void>;
    /**
     * Get the current trace ID (useful for logging correlation)
     */
    getCurrentTraceId(): string | undefined;
    /**
     * Get the current span ID
     */
    getCurrentSpanId(): string | undefined;
}
