import { Span } from './spans'; import { Trace } from './traces'; import { TracingExporter, TracingProcessor } from './processor-interface'; /** * Prints the traces and spans to the console. */ export declare class ConsoleSpanExporter implements TracingExporter { export(items: Array>): void; } /** * Exports traces and spans to the OpenAI backend. */ export declare class BackendSpanExporter implements TracingExporter { private _apiKey; private _organization; private _project; private readonly endpoint; private readonly maxRetries; private readonly baseDelay; private readonly maxDelay; private readonly client; constructor(apiKey?: string | null, organization?: string | null, project?: string | null, endpoint?: string, maxRetries?: number, baseDelay?: number, maxDelay?: number); setApiKey(apiKey: string): void; private get apiKey(); private get organization(); private get project(); export(items: Array>): Promise; close(): void; } /** * Processes traces and spans in batches. */ export declare class BatchTraceProcessor implements TracingProcessor { private readonly exporter; private readonly queue; private readonly maxQueueSize; private readonly maxBatchSize; private readonly scheduleDelay; private readonly exportTriggerSize; private nextExportTime; private isShutdown; private processingInterval; constructor(exporter: TracingExporter, maxQueueSize?: number, maxBatchSize?: number, scheduleDelay?: number, exportTriggerRatio?: number); private startProcessing; onTraceStart(trace: Trace): void; onTraceEnd(trace: Trace): void; onSpanStart(span: Span): void; onSpanEnd(span: Span): void; shutdown(): void; forceFlush(): void; private processQueue; private exportBatches; } export declare function defaultExporter(): BackendSpanExporter; export declare function defaultProcessor(): BatchTraceProcessor;