Skip to content

feat: add next debug logging #1761

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 11, 2022
Merged

feat: add next debug logging #1761

merged 1 commit into from
Nov 11, 2022

Conversation

orinokai
Copy link
Contributor

Summary

Occasionally we run into situations where it would be useful to know more about the origin response from the Next server to our handler functions.

This PR writes the origin headers and status code to the function logs when the request includes the header x-next-debug-logging.

Test plan

  1. Visit an SSR/ISR page that is routed to a handler function and include the above request header
  2. Observe the origin response in the function logs

Relevant links (GitHub issues, Notion docs, etc.) or a picture of cute animal

purple octopus

@orinokai orinokai requested a review from a team November 11, 2022 12:26
@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for netlify-plugin-nextjs-nx-monorepo-demo ready!

Name Link
🔨 Latest commit e8545ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-nx-monorepo-demo/deploys/636e3f8d5350110008020319
😎 Deploy Preview https://deploy-preview-1761--netlify-plugin-nextjs-nx-monorepo-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for netlify-plugin-nextjs-export-demo ready!

Name Link
🔨 Latest commit e8545ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-export-demo/deploys/636e3f8d3b8cf90009cc7cea
😎 Deploy Preview https://deploy-preview-1761--netlify-plugin-nextjs-export-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for netlify-plugin-nextjs-static-root-demo ready!

Name Link
🔨 Latest commit e8545ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-static-root-demo/deploys/636e3f8d3d988d0008b8ea63
😎 Deploy Preview https://deploy-preview-1761--netlify-plugin-nextjs-static-root-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for next-plugin-edge-middleware ready!

Name Link
🔨 Latest commit e8545ce
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-edge-middleware/deploys/636e3f8d5518e4000962ebbf
😎 Deploy Preview https://deploy-preview-1761--next-plugin-edge-middleware.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for netlify-plugin-nextjs-next-auth-demo ready!

Name Link
🔨 Latest commit e8545ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-next-auth-demo/deploys/636e3f8d3b8cf90009cc7cf0
😎 Deploy Preview https://deploy-preview-1761--netlify-plugin-nextjs-next-auth-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Nov 11, 2022
@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for next-plugin-canary ready!

Name Link
🔨 Latest commit e8545ce
🔍 Latest deploy log https://app.netlify.com/sites/next-plugin-canary/deploys/636e3f8d5518e4000962ebc4
😎 Deploy Preview https://deploy-preview-1761--next-plugin-canary.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for next-i18next-demo ready!

Name Link
🔨 Latest commit e8545ce
🔍 Latest deploy log https://app.netlify.com/sites/next-i18next-demo/deploys/636e3f8d3b8cf90009cc7cf5
😎 Deploy Preview https://deploy-preview-1761--next-i18next-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for netlify-plugin-nextjs-demo ready!

Name Link
🔨 Latest commit e8545ce
🔍 Latest deploy log https://app.netlify.com/sites/netlify-plugin-nextjs-demo/deploys/636e3f8e2fe40f0008e17910
😎 Deploy Preview https://deploy-preview-1761--netlify-plugin-nextjs-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Nov 11, 2022

Deploy Preview for nextjs-plugin-custom-routes-demo ready!

Name Link
🔨 Latest commit e8545ce
🔍 Latest deploy log https://app.netlify.com/sites/nextjs-plugin-custom-routes-demo/deploys/636e3f8e5518e4000962ebc9
😎 Deploy Preview https://deploy-preview-1761--nextjs-plugin-custom-routes-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@kodiakhq kodiakhq bot merged commit 9607031 into main Nov 11, 2022
@kodiakhq kodiakhq bot deleted the rs/add-next-debug-logging branch November 11, 2022 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants