Skip to content

Enhance response logging with response body for better context #178

@gmorales96

Description

@gmorales96

Currently, the middleware logs only the response status code. While this is useful, it lacks enough context when analyzing requests in CloudWatch Logs Insights or other log analysis tools.

To improve debugging and monitoring, the response body should also be included in the log entry. This will provide more complete visibility into the system’s behavior and help correlate request/response cycles effectively.

What needs to be done:

  • Extend the middleware to log the response body along with the status code.
  • Ensure the response is structured in JSON format for compatibility.
  • Avoid logging excessively large or sensitive data.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions