-
Notifications
You must be signed in to change notification settings - Fork 36
Feature: Add API request/response logging middleware #81
Copy link
Copy link
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programapiREST API componentREST API componenteasyDifficulty: EasyDifficulty: EasyenhancementNew feature or requestNew feature or request
Description
Problem
No middleware logs incoming requests or outgoing responses. Debugging production issues requires correlating logs manually.
Context
Request/response logging is essential for debugging, monitoring, and auditing API usage patterns.
Proposed Solution
Add middleware that logs: method, path, status code, response time, request ID.
Acceptance Criteria
- All requests logged with method, path, and timestamp
- Responses logged with status code and duration
- Sensitive fields (secrets, tokens) excluded from logs
- Request ID included (see related issue)
- Configurable log level (debug in dev, info in prod)
Technical Notes
- File: New
api/src/middleware/requestLogger.ts, updateapi/src/app.ts
Constraints
- Must not log request bodies containing secrets
- Must not significantly impact response latency
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave programapiREST API componentREST API componenteasyDifficulty: EasyDifficulty: EasyenhancementNew feature or requestNew feature or request