MCPcopy
hub / github.com/Doorman11991/smallcode / SpanBackend

Interface SpanBackend

src/compiled/cognition/traces.ts:98–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96}
97
98export 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
106class MemoryBackend implements SpanBackend {
107 private buffer: CognitionSpan[] = [];

Callers 12

runMethod · 0.65
_sendRequestMethod · 0.65
_sendNotificationMethod · 0.65
_requestMethod · 0.65
_notifyMethod · 0.65
_handleUncaughtMethod · 0.65
verifyAndFixCompiledFunction · 0.65
writeSpanFunction · 0.65
loadTraceFunction · 0.65
loadTraceFunction · 0.65
__resetTracesFunction · 0.65
__resetTracesFunction · 0.65

Implementers 4

MemoryBackendsrc/compiled/cognition/traces.ts
PgBackendsrc/compiled/cognition/traces.ts
NoopBackendsrc/compiled/cognition/traces.ts
MemoryBackendsrc/compiled/cognition/traces.js

Calls

no outgoing calls

Tested by

no test coverage detected