import type { Span, Context } from '@opentelemetry/api'; import type { SpanProcessor, ReadableSpan } from '@opentelemetry/sdk-trace-base'; import type { OtelTracingConfig } from './config'; /** * Realtime span processor that collects spans and sends them to an ingest endpoint * Supports real-time span sending and batched snapshots with exponential backoff retry */ export declare class RealtimeSpanProcessor implements SpanProcessor { private inMemoryStore; private changedSpans; private rolledBackSpans; private snapshotTimer; private retryCount; private readonly maxRetries; private readonly baseRetryDelay; private readonly maxRetryDelay; private nextRetryTime; private isInRecoveryMode; private readonly recoveryInterval; private nextRecoveryTime; private readonly config; constructor(config?: OtelTracingConfig); private startSnapshotTimer; /** * Calculate exponential backoff delay with jitter */ private calculateRetryDelay; /** * Reset retry state after successful send */ private resetRetryState; /** * Enter recovery mode after max retries exhausted */ private enterRecoveryMode; /** * Log detailed error information for debugging */ private logDetailedError; onStart(span: Span, parentContext: Context): void; onEnd(span: ReadableSpan): void; private addSpanToMemoryStore; private sendSnapshot; /** * Checks all traces in Memory Store and removes completed traces. * A trace is considered completed when its root span (parentId is null) is completed (not partial). */ private cleanupCompletedTraces; forceFlush(): Promise; /** * Get current processor status for debugging */ getStatus(): { isInRecoveryMode: boolean; retryCount: number; pendingSpans: number; nextRetryTime: number; nextRecoveryTime: number; }; shutdown(): Promise; private convertPartialSpan; private convertCompleteSpan; } //# sourceMappingURL=batch-processor.d.ts.map