feat: Add monitoring alerts skeleton and enhance worker with notifications

This commit is contained in:
masoodafar-web
2025-11-30 20:18:10 +03:30
parent 55fa71e09b
commit 199e7e99d1
23 changed files with 5038 additions and 1168 deletions

View File

@@ -0,0 +1,57 @@
using System.Collections.Generic;
namespace CMSMicroservice.Infrastructure.Services.Monitoring;
/// <summary>
/// تنظیمات Monitoring و Alerting
/// در appsettings.json تعریف می‌شود
/// </summary>
public class MonitoringSettings
{
public const string SectionName = "Monitoring";
/// <summary>
/// فعال بودن Sentry
/// </summary>
public bool SentryEnabled { get; set; } = false;
/// <summary>
/// Sentry DSN
/// </summary>
public string? SentryDsn { get; set; }
/// <summary>
/// فعال بودن Slack Notifications
/// </summary>
public bool SlackEnabled { get; set; } = false;
/// <summary>
/// Slack Webhook URL
/// </summary>
public string? SlackWebhookUrl { get; set; }
/// <summary>
/// فعال بودن Email Alerts
/// </summary>
public bool EmailAlertsEnabled { get; set; } = false;
/// <summary>
/// لیست ایمیل‌های Admin برای دریافت Alert
/// </summary>
public List<string> AdminEmails { get; set; } = new();
/// <summary>
/// فعال بودن SMS Notifications به کاربران
/// </summary>
public bool SmsNotificationsEnabled { get; set; } = false;
/// <summary>
/// SMS Gateway API Key
/// </summary>
public string? SmsApiKey { get; set; }
/// <summary>
/// SMS Gateway Base URL
/// </summary>
public string? SmsGatewayUrl { get; set; }
}