-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
Summary
When investigating sync issues (particularly reconciliation failures), the current logging doesn't provide sufficient detail to diagnose why specific attribute changes weren't confirmed. This makes it difficult for both developers and customers to understand and resolve issues.
Background
During investigation of an intermittent DN construction issue, we found that:
- When attributes fail to confirm during reconciliation, we log that retry is needed but not why (expected vs actual values)
- There's no easy way to correlate logs for a specific object's journey through the sync process
- The distinction between Debug and Verbose logging levels isn't being fully utilised
Current State
- Serilog with configurable minimum levels via
JIM_LOG_LEVELenvironment variable - File logging with daily rolling and 31-day retention
- Console output for real-time viewing
- Structured logging with
Log.Information(),Log.Debug(), etc. - Performance diagnostics via
Diagnostics.EnableLogging()
Recommendations
Short-term (Low Effort)
- Expected vs Actual Logging - Add expected vs actual value logging in reconciliation at Debug level
- Object ID Correlation - Add CSO ID, MVO ID, and PendingExport ID to key log messages
- Verbose Level Usage - Use
Log.Verbose()for very detailed tracing (attribute-by-attribute comparisons)
Medium-term
- Scoped Logging Context - Push object IDs to
LogContextso all nested logs include them automatically - Diagnostic Mode Toggle - Admin UI option to temporarily increase log level for a specific sync run
- Log Export API - Endpoint to download recent logs filtered by date/severity
Long-term
- Structured Log Aggregation - Integration with Seq or similar for searching structured log properties
- Per-Object Trace Mode - Ability to enable verbose logging for specific objects
- Activity-Based Log Grouping - Associate all logs for a sync activity together for easy extraction
Customer Use Case
When customers experience issues, we want to be able to:
- Ask them to increase the logging level (e.g., to Debug or Verbose)
- Have them reproduce the issue
- Collect the logs and analyse them to identify the root cause
The short-term improvements would make this workflow much more effective.
Related Files
JIM.Application/Services/PendingExportReconciliationService.cs- Reconciliation loggingJIM.Worker/Worker.cs- Logging initialisationJIM.Web/Program.cs- Web logging configurationJIM.Application/Servers/ExportEvaluationServer.cs- Export evaluation logging
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request