| 96 | } |
| 97 | |
| 98 | export interface SpanBackend { |
| 99 | write(span: CognitionSpan): Promise<void>; |
| 100 | /** Read all spans for a trace. */ |
| 101 | loadTrace(trace_id: string): Promise<CognitionSpan[]>; |
| 102 | /** For tests. */ |
| 103 | __reset?(): void; |
| 104 | } |
| 105 | |
| 106 | class MemoryBackend implements SpanBackend { |
| 107 | private buffer: CognitionSpan[] = []; |
no outgoing calls
no test coverage detected