UNPKG

@juspay/neurolink

Version:

Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and

54 lines (53 loc) 1.93 kB
export interface HealthMetrics { timestamp: number; memoryUsage: NodeJS.MemoryUsage; uptime: number; activeConnections: number; errorRate: number; averageResponseTime: number; } export declare class TelemetryService { private static instance; private sdk?; private enabled; private meter?; private tracer?; private aiRequestCounter?; private aiRequestDuration?; private aiTokensUsed?; private aiProviderErrors?; private mcpToolCalls?; private connectionCounter?; private responseTimeHistogram?; private activeConnectionCount; private errorCount; private requestCount; private totalResponseTime; private responseTimeCount; private constructor(); static getInstance(): TelemetryService; private isTelemetryEnabled; private initializeTelemetry; private initializeMetrics; initialize(): Promise<void>; traceAIRequest<T>(provider: string, operation: () => Promise<T>): Promise<T>; recordAIRequest(provider: string, model: string, tokens: number, duration: number): void; recordAIError(provider: string, error: Error): void; recordMCPToolCall(toolName: string, duration: number, success: boolean): void; recordConnection(type: "websocket" | "sse" | "http"): void; recordConnectionClosed(type: "websocket" | "sse" | "http"): void; recordResponseTime(endpoint: string, method: string, duration: number): void; recordCustomMetric(name: string, value: number, labels?: Record<string, string>): void; recordCustomHistogram(name: string, value: number, labels?: Record<string, string>): void; getHealthMetrics(): Promise<HealthMetrics>; isEnabled(): boolean; getStatus(): { enabled: boolean; endpoint?: string; service?: string; version?: string; }; private getDurationBucket; private getStatusBucket; shutdown(): Promise<void>; }