Skip to content

Better debugging #190

Description

@haapti

Next.js extends the Web fetch() API to allow each request on the server to set its own persistent caching and revalidation semantics.

In production or for production build it is hard to debug and see how many requests are server from Redis cache or any cache if you are not running your app in Vercel. Only in dev mode Next.js exports logs about fetch events with cache status. Next.js does not expose “cache hit vs origin” for fetch() in a way APM monitoring can see by default. This could be possible if you can make it visible with custom APM labels / spans.

Ideas:

  • Make adding event listeners possible for get and set methods for createRedisHandler
  • Add extra headers into responses from Redis what fetch can see, like x-nextjs-cache-handler: HIT

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions