@logspace/mcp-server
Version:
MCP server for Logspace log analysis integration with AI models.
243 lines • 6.83 kB
TypeScript
/**
* Examples demonstrating the enhanced LogSpace API capabilities
* Shows how AI can now detect issues that the old findSuspiciousPatterns missed
*/
/**
* Example 1: Detecting 200 OK responses with error data
* Old approach would miss this since status = 200
*/
declare function detectMaskedApiErrors(bugId: number): Promise<{
maskedErrorsFound: any;
issues: any;
}>;
/**
* Example 2: Correlating user interactions with missing network calls
* Detects when user clicked something but expected API call didn't happen
*/
declare function detectMissingApiCalls(bugId: number): Promise<{
suspiciousClicksCount: number;
details: {
clickElement: any;
timestamp: any;
issue: string;
}[];
}>;
/**
* Example 3: Advanced timeline analysis
* Finds complex patterns across multiple data types
*/
declare function analyzeComplexFailurePattern(bugId: number): Promise<{
complexPatternsFound: number;
patterns: {
type: string;
sequence: ({
type: string;
element: any;
url?: undefined;
duration?: undefined;
message?: undefined;
} | {
type: string;
url: any;
duration: any;
element?: undefined;
message?: undefined;
} | {
type: string;
message: any;
element?: undefined;
url?: undefined;
duration?: undefined;
})[];
timespan: number;
severity: string;
}[];
insights: string;
}>;
/**
* Example 4: Performance correlation analysis
* Links performance issues to user behavior and errors
*/
declare function analyzePerformanceImpact(bugId: number): Promise<{
performanceIssuesWithImpact: number;
correlations: {
slowOperation: {
name: any;
duration: any;
type: any;
};
followingErrors: any;
userFrustrationIndicators: any;
impact: string;
}[];
recommendation: string;
}>;
/**
* Example 5: Smart investigation workflow with fallback
* AI can run this to get comprehensive insights
*/
declare function smartInvestigation(bugId: number): Promise<{
sessionOverview: {
sessionInfo: {
id: any;
username: any;
assignee: any;
environment: any;
status: any;
created_at: any;
video_url: any;
};
metadata: any;
sessionData: any;
};
quickFindings: {
sessionSummary: {
sessionInfo: {
id: any;
username: any;
assignee: any;
environment: any;
status: any;
created_at: any;
video_url: any;
};
metadata: any;
sessionData: any;
};
criticalIssues: {
type: string;
severity: string;
count: number;
details: any[];
}[];
recommendations: any[];
};
deepAnalysis: {
maskedApiErrors: {
maskedErrorsFound: any;
issues: any;
};
missingApiCalls: {
suspiciousClicksCount: number;
details: {
clickElement: any;
timestamp: any;
issue: string;
}[];
};
complexFailurePatterns: {
complexPatternsFound: number;
patterns: {
type: string;
sequence: ({
type: string;
element: any;
url?: undefined;
duration?: undefined;
message?: undefined;
} | {
type: string;
url: any;
duration: any;
element?: undefined;
message?: undefined;
} | {
type: string;
message: any;
element?: undefined;
url?: undefined;
duration?: undefined;
})[];
timespan: number;
severity: string;
}[];
insights: string;
};
performanceCorrelations: {
performanceIssuesWithImpact: number;
correlations: {
slowOperation: {
name: any;
duration: any;
type: any;
};
followingErrors: any;
userFrustrationIndicators: any;
impact: string;
}[];
recommendation: string;
};
};
overallAssessment: {
severity: string;
primaryIssues: (string | false)[];
recommendations: string[];
message?: undefined;
dataStats?: undefined;
recommendation?: undefined;
};
fallbackReason?: undefined;
comprehensiveData?: undefined;
} | {
sessionOverview: {
sessionInfo: {
id: any;
username: any;
assignee: any;
environment: any;
status: any;
created_at: any;
video_url: any;
};
metadata: any;
sessionData: any;
};
quickFindings: {
sessionSummary: {
sessionInfo: {
id: any;
username: any;
assignee: any;
environment: any;
status: any;
created_at: any;
video_url: any;
};
metadata: any;
sessionData: any;
};
criticalIssues: {
type: string;
severity: string;
count: number;
details: any[];
}[];
recommendations: any[];
};
fallbackReason: string;
comprehensiveData: {
fullTimeline: any[];
allNetworkRequests: any;
allConsoleLogs: any;
allPerformanceData: any;
allInteractions: any;
userAnnotations: any;
};
overallAssessment: {
severity: string;
message: string;
dataStats: {
networkRequestCount: any;
consoleLogCount: any;
performanceEventCount: any;
userInteractionCount: any;
timelineEventCount: number;
};
recommendation: string;
primaryIssues?: undefined;
recommendations?: undefined;
};
deepAnalysis?: undefined;
}>;
export { detectMaskedApiErrors, detectMissingApiCalls, analyzeComplexFailurePattern, analyzePerformanceImpact, smartInvestigation, };
//# sourceMappingURL=investigationExamples.d.ts.map