/** * Span exporters for workflow tracing * * Supports: * - Console (for development/debugging) * - OTLP HTTP (OpenTelemetry Protocol) * - Jaeger (via OTLP or native) * - Zipkin */ import type { WorkflowSpan, SpanExporter } from '@cogitator-ai/types'; export interface SpanExporterInstance { export(spans: WorkflowSpan[]): Promise; shutdown(): Promise; } export interface ExporterConfig { type: SpanExporter; endpoint?: string; headers?: Record; batchSize?: number; flushInterval?: number; verbose?: boolean; } /** * Console exporter for development/debugging */ export declare class ConsoleSpanExporter implements SpanExporterInstance { private verbose; constructor(verbose?: boolean); export(spans: WorkflowSpan[]): Promise; shutdown(): Promise; } export declare class OTLPSpanExporter implements SpanExporterInstance { private endpoint; private headers; private batchSize; private flushInterval; private maxRetries; private pendingSpans; private flushTimer; private consecutiveFailures; constructor(config: { endpoint?: string; headers?: Record; batchSize?: number; flushInterval?: number; maxRetries?: number; }); export(spans: WorkflowSpan[]): Promise; private flush; private toOTLPFormat; private spanToOTLP; private kindToOTLP; private valueToOTLP; shutdown(): Promise; } /** * Zipkin exporter */ export declare class ZipkinSpanExporter implements SpanExporterInstance { private endpoint; private headers; private serviceName; constructor(config: { endpoint?: string; headers?: Record; serviceName?: string; }); export(spans: WorkflowSpan[]): Promise; private toZipkinFormat; private kindToZipkin; shutdown(): Promise; } /** * Composite exporter that sends to multiple backends */ export declare class CompositeSpanExporter implements SpanExporterInstance { private exporters; constructor(exporters: SpanExporterInstance[]); export(spans: WorkflowSpan[]): Promise; shutdown(): Promise; } /** * No-op exporter for when tracing is disabled */ export declare class NoopSpanExporter implements SpanExporterInstance { export(): Promise; shutdown(): Promise; } /** * Factory function to create an exporter from config */ export declare function createSpanExporter(config: ExporterConfig): SpanExporterInstance; //# sourceMappingURL=exporters.d.ts.map