Skip to content

Add Request/Response Logging Middleware [13](#header-13) #32

@fuzziecoder

Description

@fuzziecoder

🎯 Issue Summary

Enhance the existing logging middleware to include comprehensive request/response logging with sensitive data redaction.

📋 Current Behavior

Basic logging exists at 2-cite-4 but needs enhancements.

Current Features:

  • Request ID tracking
  • Basic request/response logging
  • Sensitive field redaction from 2-cite-5

Missing Features:

  • Response body logging
  • Correlation ID propagation
  • Log aggregation support
  • Performance metrics per endpoint

✨ Proposed Enhancements

  • Add configurable response body logging
  • Include correlation IDs for distributed tracing
  • Add endpoint-level performance metrics
  • Support structured JSON logging

🔧 Technical Requirements

1. Response Body Logging

  • Add LOG_RESPONSE_BODY config flag
  • Capture response body before sending
  • Redact sensitive fields from response
  • Limit response body size (max 10KB)

2. Correlation ID

  • Generate correlation ID per request
  • Propagate to all downstream services
  • Include in all log entries

Wiki pages you might want to explore:

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions