34 lines
1000 B
TypeScript
34 lines
1000 B
TypeScript
// Metrics Service - Stub for deal orchestrator
|
|
// When monitoring stack is deployed: add Prometheus push (PROMETHEUS_PUSH_GATEWAY) or expose scrape endpoint here.
|
|
|
|
import { logger } from '@/infrastructure/monitoring/logger';
|
|
|
|
class MetricsService {
|
|
updateActiveDeals(_status: string, _count: number): void {
|
|
// Stub: record in real metrics when monitoring available
|
|
}
|
|
|
|
recordStepExecution(_step: string, _durationSeconds: number): void {
|
|
// Stub
|
|
}
|
|
|
|
recordError(_errorName: string, _step?: string): void {
|
|
logger.debug('Metrics: recordError', { errorName: _errorName, step: _step });
|
|
}
|
|
|
|
recordDealExecution(
|
|
_status: string,
|
|
_participantBankId: string,
|
|
_moduleId: string,
|
|
_durationSeconds: number
|
|
): void {
|
|
// Stub
|
|
}
|
|
|
|
recordRiskViolation(_violationType: string, _severity: string): void {
|
|
logger.warn('Metrics: risk violation', { violationType: _violationType, severity: _severity });
|
|
}
|
|
}
|
|
|
|
export const metricsService = new MetricsService();
|