/** * Memory Observability Adapter * In-memory storage for development and testing */ import type { ObservabilityAdapter, TraceContext, SpanContext, SpanKind, SpanStatus, SpanData, TraceData, AttributionContext } from '../types'; /** * Memory Observability Adapter * Stores all traces and spans in memory for development/testing */ export declare class MemoryObservabilityAdapter implements ObservabilityAdapter { readonly name = "memory"; readonly isEnabled = true; private traces; private spans; private maxTraces; constructor(options?: { maxTraces?: number; }); initialize(): Promise; shutdown(): Promise; startTrace(name: string, metadata?: Record, attribution?: AttributionContext): TraceContext; endTrace(traceId: string, status?: SpanStatus): void; startSpan(traceId: string, name: string, kind: SpanKind, parentId?: string): SpanContext; endSpan(spanId: string, status?: SpanStatus, attributes?: Record): void; addEvent(spanId: string, name: string, attributes?: Record): void; recordError(spanId: string, error: Error): void; flush(): Promise; getTrace(traceId: string): TraceData | undefined; getSpan(spanId: string): SpanData | undefined; getAllTraces(): TraceData[]; getAllSpans(): SpanData[]; getTraceSpans(traceId: string): SpanData[]; clear(): void; getStats(): { traces: number; spans: number; }; } export declare function createMemoryAdapter(options?: { maxTraces?: number; }): MemoryObservabilityAdapter;