خلاصه تغییرات
بازسازی سیستم Logging: انتقال logging از xCommons به xLoggingService، middleware جدید، OpenTelemetry integration، و اعمال در تمام API.
هدف: متحدکردن logging و افزایش قابلیت رصد سیستم.
1️⃣ Modules/xCommons
- حذف
Middlewares/XRequestLogger.cs - تغییر
XMiddlewareExtensions.cs - تغییر
XLoggerModel.cs- اضافه Exception property
2️⃣ Modules/xLoggingService
- جدید
MIddlewares/XRequestLoggingMiddleware.cs - تغییر DI - اضافه OpenTelemetry methods
- تغییر xLoggingService.csproj - بهروزرسانی packages
⚠️ توجه: پوشه "MIddlewares" typo است
3️⃣ xAiApi
- تغییر .gitignore، Program.cs، Startup.cs، xAiApi.csproj
- اضافه xLoggingService، OpenTelemetry logging
4️⃣ xAiMcpServer
- تغییر .gitignore، Program.cs، Startup.cs
- یکسان با xAiApi
5️⃣ xApi
بدون تغییر - بررسی کنید
6️⃣ xIds
- تغییر Program.cs، Startup.cs، xIds.csproj
- اضافه xLoggingService و OpenTelemetry
📊 آمار
| ماژول | فایلها | افزوده | حذف |
|---|---|---|---|
| xCommons | 3 | 5 | 159 |
| xLoggingService | 2 | 90 | 9 |
| xAiApi | 4 | 27 | 5 |
| xAiMcpServer | 3 | 13 | 1 |
| xIds | 4 | 39 | 16 |
🎯 خطوات بعدی
- v02: تصحیح typo MIddlewares
- v02: همترازی xApi
- v02: آزمایش Logging