/** * Distributed Tracing for Multi-Agent scenarios — AgentProbe v4.12.0 * * Enables trace context propagation across multiple agents in * orchestration tests, with span correlation. */ import type { OTelSpan } from '../otel'; export interface TraceContext { traceId: string; spanId: string; parentSpanId?: string; agentId: string; baggage: Record; startTimeUnixNano: number; sampled: boolean; } export interface CorrelatedTrace { traceId: string; agents: string[]; spans: OTelSpan[]; rootSpan: OTelSpan; timeline: AgentTimeline[]; totalDurationMs: number; crossAgentCalls: CrossAgentCall[]; } export interface AgentTimeline { agentId: string; spans: OTelSpan[]; startMs: number; endMs: number; durationMs: number; } export interface CrossAgentCall { fromAgent: string; toAgent: string; spanId: string; operation: string; durationMs: number; } export declare class DistributedTracer { private traces; private spans; /** * Start a new distributed trace for a test. */ startTrace(testId: string): TraceContext; /** * Propagate trace context to a child agent. * Creates a new child span for the agent's work. */ propagateContext(ctx: TraceContext, agentId: string): TraceContext; /** * Record a span from an agent's work. */ recordSpan(ctx: TraceContext, span: OTelSpan): void; /** * Complete an agent's trace context (set end time). */ completeContext(ctx: TraceContext, status?: 'OK' | 'ERROR'): void; /** * Correlate spans across multiple trace contexts into a unified view. */ correlateSpans(traces: TraceContext[]): CorrelatedTrace; /** * Get all spans for a trace. */ getSpans(traceId: string): OTelSpan[]; /** * Reset internal state. */ reset(): void; } //# sourceMappingURL=distributed.d.ts.map