UNPKG

@ahmedhegazee/nestjs-telescope

Version:

Advanced observability and monitoring solution for NestJS applications with ML-powered analytics, enterprise features, and production-ready scaling

48 lines (47 loc) 1.66 kB
import { TelescopeService } from '../services/telescope.service'; import { MetricsService } from '../services/metrics.service'; import { ResilientBridgeService } from '../../devtools/bridge/resilient-bridge.service'; import { TelescopeConfig } from '../interfaces/telescope-config.interface'; export interface HealthCheckResponse { status: 'healthy' | 'unhealthy' | 'degraded'; timestamp: Date; uptime: number; version: string; services: { telescope: ServiceHealth; metrics: ServiceHealth; bridge: ServiceHealth; storage: ServiceHealth; }; metrics: { totalEntries: number; errorRate: number; averageProcessingTime: number; throughput: number; }; circuitBreakers?: Record<string, any>; } export interface ServiceHealth { status: 'healthy' | 'unhealthy' | 'degraded'; message?: string; details?: any; lastChecked: Date; } export declare class HealthController { private readonly telescopeService; private readonly metricsService; private readonly resilientBridge; private readonly config; private readonly logger; private readonly startTime; constructor(telescopeService: TelescopeService, metricsService: MetricsService, resilientBridge: ResilientBridgeService, config: TelescopeConfig); getHealth(): Promise<HealthCheckResponse>; getDetailedHealth(): Promise<any>; getMetrics(): Promise<any>; getCircuitBreakers(): Promise<any>; private checkTelescopeHealth; private checkMetricsHealth; private checkBridgeHealth; private checkStorageHealth; private determineOverallStatus; }