feat: Add structured request/response logging with redaction (#590) - #639
Merged
Abdulazeem-code merged 3 commits intoSep 3, 2026
Merged
Conversation
|
@Peolite1 is attempting to deploy a commit to the Abdulazeem's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Peolite1 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Owner
|
FIX FAILED CHECKS |
Contributor
Author
done |
Owner
|
FIX FAILED CHECKS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Writeup: Structured Request/Response Logging with Redaction
Closes #590
Description
This PR addresses issue #590 by introducing structured, machine-parseable JSON logging across the application using
pino-http, and ensures that sensitive secrets are safely redacted before logs are ever emitted.Previously, logging relied on ad-hoc
logger.error()calls which could inadvertently leak sensitive fields (like signatures and API keys) into log aggregators in plain text.Changes Included
pino-httpinto the Express middleware stack (server.js) withautoLogging: true, ensuring that every single incoming HTTP request is automatically tracked.src/logger.jsthat deeply inspects request headers and payloads. It intercepts and redacts the following sensitive fields to[REDACTED]:signaturesecretx-api-keyauthorizationmethod,path(url), responsestatuscode, and the total request duration (viapino-http's nativeresponseTime).Impact
This change significantly improves observability for production log analysis and debugging, while enforcing strict security boundaries to prevent accidental exposure of sensitive keys and tokens in external log aggregators.