Universal Request Lifecycle Logging ‐ Request Scope - Yash-777/MyWorld GitHub Wiki
This framework provides a centralized mechanism to capture all request-related activities within a single API execution. It collects request and response payloads from different service calls and logs them in a structured format for debugging, auditing, and troubleshooting.
Data Structure ➩ Use a nested map for flexibility:
Map<String, Map<String, String>> requestLogs;
Outer Map Key (String): Call identifier (API, DB operation, service call, etc.)
Inner Map (Map<String, String>):
* "request" → serialized request payload
* "response" → serialized response payload
* Optional: "timestamp" → time of the call
* Optional: "duration" → execution time