codecrucible-synth
Version:
Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability
58 lines • 1.81 kB
TypeScript
/**
* Observability and Monitoring System
* Provides enterprise-grade monitoring, metrics, and observability features
*/
import { EventEmitter } from 'events';
export interface MetricValue {
name: string;
value: number;
timestamp: Date;
tags?: Record<string, string>;
}
export interface HealthMetric {
component: string;
status: 'healthy' | 'degraded' | 'unhealthy';
responseTime: number;
details?: Record<string, any>;
}
export interface ObservabilityConfig {
metricsEnabled: boolean;
tracingEnabled: boolean;
loggingLevel: string;
retentionDays: number;
}
export declare class ObservabilitySystem extends EventEmitter {
private metrics;
private config;
private healthMetrics;
constructor(config?: Partial<ObservabilityConfig>);
recordMetric(metric: MetricValue): void;
recordHealthMetric(healthMetric: HealthMetric): void;
getMetric(name: string): MetricValue[];
getHealthMetric(component: string): HealthMetric | undefined;
getAllMetrics(): Record<string, MetricValue[]>;
getAllHealthMetrics(): Record<string, HealthMetric>;
getSystemOverview(): {
totalMetrics: number;
healthyComponents: number;
unhealthyComponents: number;
averageResponseTime: number;
};
startMonitoring(): void;
stopMonitoring(): void;
clearMetrics(): void;
}
export declare const observabilitySystem: ObservabilitySystem;
export declare const metrics: {
apiRequestDuration: {
observe: (labels: Record<string, string>, value: number) => void;
};
memoryUsage: {
set: (value: number) => void;
};
};
export declare const logging: {
error: (message: string, error?: Error) => void;
info: (message: string) => void;
};
//# sourceMappingURL=observability.d.ts.map