next-zonesv0.1.0

Instrumentation

Next runs one instrumentation.ts per server. With zones there is one server and several apps, so next-zones dispatches.

register() onRequestError()
The shell's once, when the server starts for errors on every route, any zone's included (unless the policy skips a zone)
A zone's own when that zone image is installed for errors on that zone's routes only

A zone never sees another zone's errors.

The policy#

zones.config.json, in the workspace's folder (beside the zones' folders), read by next-zones start, serve, zones.js and mode "single" (see the CLI); or createZones({ policy }) with the same object:

{
  "instrumentation": {
    "shell": { "skip": ["shop"] },
    "own": { "blog": false }
  }
}

Things to know#

The same in both modes: on Zones, and in mode "single", where next-zones writes the one app's instrumentation file to dispatch this way. A zone's register() runs when Zones installs its image, or, in one app, when that app starts.

Edit this page on GitHub · Markdown