namespace Managing.Infrastructure.Databases.PostgreSql; /// /// Configuration settings for SQL query monitoring and loop detection /// public class SqlMonitoringSettings { /// /// Whether SQL monitoring is enabled globally (default: true) /// public bool Enabled { get; set; } = true; /// /// Whether SQL query logging is enabled (default: true) /// public bool LoggingEnabled { get; set; } = true; /// /// Whether Sentry integration is enabled (default: true) /// public bool SentryEnabled { get; set; } = true; /// /// Whether loop detection is enabled (default: true) /// public bool LoopDetectionEnabled { get; set; } = true; /// /// Whether performance monitoring is enabled (default: true) /// public bool PerformanceMonitoringEnabled { get; set; } = true; /// /// Time window for loop detection in seconds (default: 60) /// public int LoopDetectionWindowSeconds { get; set; } = 60; /// /// Maximum query executions per window for loop detection (default: 100) /// public int MaxQueryExecutionsPerWindow { get; set; } = 100; /// /// Maximum method executions per window for loop detection (default: 50) /// public int MaxMethodExecutionsPerWindow { get; set; } = 50; /// /// Threshold for long-running queries in milliseconds (default: 1000) /// public int LongRunningQueryThresholdMs { get; set; } = 1000; /// /// Threshold for Sentry alerts (default: 5) /// public int SentryAlertThreshold { get; set; } = 5; /// /// Threshold for slow queries in milliseconds (default: 2000) /// public int SlowQueryThresholdMs { get; set; } = 2000; /// /// Whether to log only slow queries (reduces overhead) (default: false) /// public bool LogSlowQueriesOnly { get; set; } = false; /// /// Whether to log only errors (minimal overhead) (default: false) /// public bool LogErrorsOnly { get; set; } = false; /// /// Data retention period in minutes for monitoring dashboard (default: 30) /// public int DataRetentionMinutes { get; set; } = 30; }