SHADE is young: 0.1.0-next.2 is a pre-release, and 0.1.0 isn't out yet.

SHADE
InstalledModules

Error forwarding (module)

Error forwarding sends the errors SHADE stores in its error log to a GlitchTip or Sentry that the client picks, and lets you decide which errors go to which server. It is an official module: an admin installs it, fills in its settings and switches it on under Modules. It has no screen of its own; everything is in its settings. It is off until you switch it on, and it sends nothing until a server and a DSN are set.

What users can do

Admins

  • Install the module and switch it on or off under Modules (Managing modules).
  • Set the Default server: its address and the project's DSN.
  • Optionally set a second, Other server, and write Rules that send some errors there, some to the default server, and some nowhere through this module.
  • Optionally let the site's builds be marked on the server (Site builds), so each site error shows the build it came after.
  • See whether forwarding works under Sending, below the settings: when an error was last sent, last failed and last refused over SHADE's limit of calls, and the last 20 sends, newest first, each with its server, the error's type and, for one that failed, why.

Editors and visitors see nothing of it.

Settings

Open the module under Modules and choose Settings. The form has four sections.

Default server

  • Server address: the address of your GlitchTip or Sentry, such as https://errors.example.org. The module calls this address and no other. It must be https, and a public address (never the server's own network).
  • DSN: the project's DSN, https://<key>@<host>/<project>, from the project's settings. It must be on the server address above (the same host). It holds a key, so it is stored encrypted and never shown again.
  • Environment name: optional, such as production; shown with each error.
  • Errors that browsers wrote: errors from a site's visitors and from modules' admin screens. They are only given to the module when the operator also set SHADE_ERROR_REPORTING_SITE=true (Error reporting); this setting is the second gate.
    • Keep them here (the default): they never leave the instance. SHADE's own error reporting doesn't send them either, so they are only in the error log.
    • Forward them by the rules: like any other error.
    • Leave them to SHADE's own error reporting: the module declines them, and SHADE sends them to its own DSN if the operator set one.

Other server: the same two fields (server address and DSN) for a second server. Rules can send errors here, for example the errors of one module to the project of the team that maintains it. There are two servers because SHADE only lets the module call addresses written in its settings, and each address needs its own field.

Rules: up to 20, in order. A rule has:

  • Where it happened: anywhere, the API, a module's hook, a background job, an untrusted module (sandbox), the site's browser, or a module that did not load.
  • Module (optional): the name of a module, such as commerce. A rule with both parts matches only errors that fit both; a rule with neither matches every error.
  • Then: Send to the default server, Send to the other server or Don't forward.
  • Share sent (%): of the errors the rule matches, the share that is sent, 100 by default. The rest stay in the instance: SHADE's own error reporting doesn't send them either. Use it for a noisy source.
  • Leave out the message, the stack or the request id: these go without that field. Without the message, only the error's name, its source and the stack's frames (not its text) go.

The first rule that matches decides. An error that matches no rule goes to the default server, all of it. To set a share or leave fields out for every error, end the list with a rule for Anywhere.

Privacy: what is hidden before an error leaves, on top of what SHADE always takes out.

  • Hide long numbers and ids: on by default. Numbers of six digits or more (phone, customer and citizen service numbers, invoice series such as 2026-0001, also written with spaces, dots or dashes), IBANs and UUIDs are replaced with [number:9] (how many digits it had, so a citizen service number shows apart from a longer id), [iban] and [id]. Dates and times stay, so you still see when something happened: ISO dates and times such as 2026-11-17, 20261117 and 2026-11-17T10:15:00.250+01:00 (years 1970 to 2099, with a real month and day), and Unix timestamps in seconds or milliseconds from 2001 to 2100 (10 or 13 digits starting with 1). A number after a + is a phone number, and stays hidden.
  • Words to hide: up to 20 texts that never leave in an error, whatever their case, such as a client's name; each is replaced with [hidden]. At least 3 characters.

Both apply to the message and to the stack's text, never to the stack's frames (the script, line and column the server needs, also for source maps).

Site builds: optional, for the server the site's errors go to (by the rules above).

  • Auth token: an auth token of that server allowed to write releases (project:releases). It holds a key, so it is stored encrypted and never shown again.
  • Organisation and Project: the slugs of the organisation and of the project site errors go to, such as shade and site.

Site builds and releases

Each build of the site has a release name: the build's start time (site@20261117.101500), or the name the site's host sets in SITE_RELEASE, such as a commit. Every error the site's visitors report carries it, and the module sends it as the error's release; SHADE's own errors carry SHADE's version. When a build is done, the site tells SHADE its release, and the module creates that release and a deploy of it on the server, with the build's start and end times and the environment name (production when none is set). The server then shows which build each error came after.

Nothing is marked while browsers' errors are not forwarded (the switch is off, or a rule says Don't forward for the site's browser), without a DSN where site errors go, or without the token, organisation and project. A server without deploys (some GlitchTip versions) keeps the release only. Only the release name and the build's times leave; the auth token is used for these calls and nothing else. Each marked build is in the audit log.

Source maps

The site's scripts are minified, so a stack from a visitor's browser points at one long line. When a build is marked, the site also sends each of its scripts with its source map, and the module uploads them to the same server, for that release. The server then shows each error's stack as the code was written. The site never serves a source map: its build makes them without a reference in the scripts, deletes them once sent, and its web server refuses any .map address. A map too large to send in one request (over about 450 KB gzipped) is left out, and the build says which.

What is sent

The scrubbed fields of the error group and nothing else: the error's name, message and stack, its source, the module, the request id, the release (the site build for a site's error, SHADE's version for the rest), and the environment name if you set one. The format is the same as SHADE's own error reporting; the container role tag is the only difference (only SHADE knows it). No request or answer body, header, cookie, address, user or team member is sent. The texts have been scrubbed of email and IP addresses, query strings, credentials and tokens before the module sees them, and the module hides what Privacy says and leaves out what the matching rule says.

When an error is sent by SHADE instead

The module answers per error. SHADE's own error reporting (SHADE_ERROR_REPORTING_DSN) is the fallback, and an error goes once:

  • The module sent it (the server answered with a success): SHADE sends nothing. The same when the server says it is overloaded (it answers 429; the error is not sent again), and for a repeat of an error that already went less than a minute ago: each error repeats on the server at most once a minute (a new or reopened one always goes, and the error log still counts every repeat).
  • The module kept it in the instance: a browser's error while Errors that browsers wrote says Keep them here, or an error a rule's Share sent leaves out. SHADE sends nothing either; the error log has it.
  • A rule says Don't forward, no DSN is set for where the rule sends it, or it is a browser's error left to SHADE's own error reporting: the module declines, and SHADE sends the error to SHADE_ERROR_REPORTING_DSN if the operator set one. So Don't forward means "not through this module", not "nowhere": without a DSN in the environment it is sent nowhere; with one, SHADE sends it there. That is how SHADE decides it, so the operator's DSN always catches what the module does not send.
  • The module is off or failed to load, the server answers with an error, the DSN is wrong or not on the server address, the address is refused, or the call takes longer than 5 seconds: SHADE sends the error to its own DSN, and writes a warning to the log (once a minute at most). The 5 seconds count from when SHADE asked, so the module's own call has stopped by then and the error is not sent twice.
  • A DSN that is wrong or not on its server address also shows under the module's health on the Modules page ("Errors are not forwarded: …"), checked every 5 minutes: the form does not check it when you save.

Who may do it

ActionPermissionRoles
Change the module's settingspackages.manageadmin
Switch the module on or offpackages.manageadmin
Mark a site build (POST /api/packages/error-forwarding/builds)build.reportthe site's build token
Send a script's source map (POST /api/packages/error-forwarding/builds/source-maps)build.reportthe site's build token

The module has no actions of its own. It is trusted only: an untrusted module cannot forward errors, and only one module per instance can.

Privacy

The server you name receives error messages, so it must be yours or in the EU, and the client must know of it (privacy); nothing is sent until you set a server and a DSN. The module's only capabilities are network, limited to the two server addresses in its settings, http, for the routes the site's build calls and the Sending list reads, and kv, for that list (each send's outcome, server, error group and type, never the error's message) and the count of sends refused over the limit, and adminPlaces, to show that list below the settings. The error log stays the record.

Rules and limits

  • At most 20 rules and two servers, and 20 words to hide.
  • 5 seconds per error, then SHADE sends it itself.
  • One repeat of the same error a minute.
  • 30 build markers a minute per build token, and 600 source maps.
  • A source map of at most 20 MB, sent in one request of at most 1 MB (gzipped).
  • The DSN must be https with a public key and a numeric project, and on the same host as the server address.
  • Switching the module off keeps its settings; uninstalling it removes them.

For developers

The code and its tests: the README of shade-plugin-error-forwarding. The manifest part it uses is errorForwarding.