Files
xSaherelmWorkspace/Documents/Docs/ChangeLogs/CommitMessage-1405-08-17-v01.txt
T
saherelm 01ea6d15c2 feat: refactor logging with OpenTelemetry integration
refactor: migrate XRequestLogger to xLoggingService
- Move Logging from xCommons to xLoggingService
- Add new XRequestLoggingMiddleware
- Integrate OpenTelemetry (v1.6.0)
- Apply logging across xAiApi, xAiMcpServer, xIds
- Update .gitignore for Logs folders

Breaking Changes:
- UseXRequestLogger now in xLoggingService.DI
- OpenTelemetry packages updated
2026-11-09 12:54:16 +03:30

136 lines
5.1 KiB
Plaintext

================================================================================
Commit Message - xSaherelmWorkspace
تاریخ: ۱۴۰۵/۰۸/۱۷ (2026-11-09)
نسخه مستند: v01
گزارش کامل: Documents/Docs/ChangeLogs/1405-08-17-v01.html
================================================================================
هدف: بازسازی سیستم Logging، اضافه OpenTelemetry، انتقال middleware logging
از xCommons به xLoggingService، یکپارچگی در تمام API و خدمات.
وضعیت: تغییرات کامیت نشده
================================================================================
[1] MODULES / xCommons - حذف Logging Responsibilities
================================================================================
1.1) حذف XRequestLogger Middleware
- حذف: Modules/xCommons/Middlewares/XRequestLogger.cs (144 خط)
- دلیل: منتقل شده به xLoggingService با بهبوری
1.2) تغییر Extensions
- فایل: XMiddlewareExtensions.cs
- تغییر: حذف متد UseXRequestLogger()
- نتیجه: کلاس اکنون خالی است
1.3) بهبود XLoggerModel
- اضافه: Exception property = null
- تنظیم: ترتیب Properties
================================================================================
[2] MODULES / xLoggingService - Enhancement
================================================================================
2.1) Middleware جدید
- فایل: MIddlewares/XRequestLoggingMiddleware.cs (NEW)
- ویژگی: Simple/Full logging modes
- قابلیت: HTTP request/response logging، exception handling
⚠️ توجه: نام پوشه "MIddlewares" typo است - باید تصحیح شود
2.2) توسعه DI
- متد: AddXTelemetryLogger() - logging configuration
- متد: AddXTelemetry() - host builder extension
- متد: UseXRequestLogger() - middleware registration
2.3) به‌روزرسانی Dependencies
- OpenTelemetry.Extensions.Hosting v1.6.0
- OpenTelemetry.Instrumentation.Http v1.6.0
- OpenTelemetry.Instrumentation.AspNetCore v1.6.0
- OpenTelemetry.Exporter.OpenTelemetryProtocol v1.6.0
- Microsoft.Extensions.Logging.Console v5.0.0
================================================================================
[3] xAiApi - Logging Integration
================================================================================
فایل‌های تغییر:
- .gitignore: +Logs
- Program.cs: +xLoggingService، +AddXTelemetryLogger، +AddXTelemetry
- Startup.cs: +UseXRequestLogger (non-development)
- xAiApi.csproj: +xLoggingService reference
================================================================================
[4] xAiMcpServer - Logging Integration
================================================================================
یکسان با xAiApi:
- .gitignore: +Logs
- Program.cs: Telemetry configuration
- Startup.cs: Request logging middleware
================================================================================
[5] xApi - No Changes
================================================================================
وضعیت: بدون تغییر - بررسی کنید
================================================================================
[6] xIds - Logging Integration & Refactoring
================================================================================
تغییرات:
- Program.cs: Arrow → معمولی، +Telemetry
- Startup.cs: isDevelopmentEnvironment var، +logging middleware
- xIds.csproj: +xLoggingService reference
================================================================================
VALIDATION
================================================================================
✓ git diff تمام modules بررسی شد
✓ فایل‌های جدید و حذف شده شناسایی شدند
⚠️ باید انجام شود:
- build تمام projects
- unit/integration tests
- manual logging testing
- OpenTelemetry configuration
================================================================================
COMMIT TITLE (Conventional Commits)
================================================================================
feat: refactor logging with OpenTelemetry integration
refactor: migrate XRequestLogger to xLoggingService
- Move Logging from xCommons to xLoggingService
- Add new XRequestLoggingMiddleware
- Integrate OpenTelemetry (v1.6.0)
- Apply logging across xAiApi, xAiMcpServer, xIds
- Update .gitignore for Logs folders
Breaking Changes:
- UseXRequestLogger now in xLoggingService.DI
- OpenTelemetry packages updated
================================================================================
NEXT VERSIONS (v02, v03)
================================================================================
v02:
- تصحیح typo: MIddlewares → Middlewares
- هم‌ترازی xApi
- آزمایش جامع
v03:
- Structured Logging (JSON)
- OpenTelemetry Exporters
================================================================================
برای نسخه بعدی:
1405-08-17-v02.html
CommitMessage-1405-08-17-v02.txt
===============================================================================