/** * Trace Analyzer for AgentProbe v4.12.0 * * Analyzes OTel spans to detect performance issues, anomalies, * and generate actionable insights. */ import type { OTelSpan } from '../otel'; export interface Bottleneck { spanId: string; operationName: string; durationMs: number; percentOfTotal: number; type: 'slow-tool' | 'slow-llm' | 'slow-test' | 'queue-wait'; suggestion: string; } export interface Anomaly { type: 'retry-storm' | 'infinite-loop' | 'error-cascade' | 'timeout' | 'unusual-duration'; severity: 'low' | 'medium' | 'high' | 'critical'; spanIds: string[]; description: string; evidence: Record; } export interface TraceAnalysis { totalSpans: number; totalDurationMs: number; spansByType: Record; errorRate: number; bottlenecks: Bottleneck[]; anomalies: Anomaly[]; insights: string[]; summary: string; } export declare class TraceAnalyzer { private spans; private _bottlenecks; private _anomalies; constructor(); /** * Analyze a set of OTel spans and produce a comprehensive analysis. */ analyzeSpans(spans: OTelSpan[]): TraceAnalysis; private calculateTotalDuration; private categorizeSpans; private calculateErrorRate; /** * Find performance bottlenecks in the trace. */ findBottlenecks(): Bottleneck[]; private suggestFix; /** * Find anomalies in span patterns. */ findAnomalies(): Anomaly[]; /** * Generate human-readable insights from the analysis. */ generateInsights(): string[]; private generateSummary; } //# sourceMappingURL=analyzer.d.ts.map