add uptime docs, structured logger, request ID middleware, and escrow…#822
Open
Andreschuks101 wants to merge 1 commit into
Open
add uptime docs, structured logger, request ID middleware, and escrow…#822Andreschuks101 wants to merge 1 commit into
Andreschuks101 wants to merge 1 commit into
Conversation
|
@Andreschuks101 is attempting to deploy a commit to the Stephen's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Andreschuks101 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! 🚀 |
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.
Summary
docs/ops/uptime.mddocumenting UptimeRobot setup to monitor/api/healthevery 5 minutes with email and Slack alerts, including a simulated 6-minute downtime acceptance test procedure.lib/logger.tsimplementing structured JSON logging ({ level, message, timestamp, context }). In production onlywarnand above are emitted as JSON objects; in development output is pretty-printed.middleware.tsat the project root as a Next.js Edge middleware that generates ax-request-idUUID per request, attaches it to the upstream request headers, and echoes it back in the response headers for all/api/*routes.hooks/useArchivedEscrows.ts, a client-side hook that persists archived escrow IDs inlocalStorageand exposesarchiveEscrow,unarchiveEscrow, andisArchivedhelpers.app/escrows/page.tsxto importuseArchivedEscrowsand render an Archive/Unarchive icon button on everyreleasedorexpiredescrow card. A "Show archived (N)" toggle button appears in the header when at least one escrow is archived and switches the list between active and archived views.Test plan
NODE_ENV=production), trigger an error path and confirm the console output is a valid JSON object withlevel,message,timestampfields./api/*route and confirm thex-request-idresponse header is present and is a valid UUID.released/expiredescrow cards.localStorage.docs/ops/uptime.mdsetup steps in UptimeRobot and simulate a 6-minute downtime to verify alert delivery.closes #727
closes #721
closes #719