Module workers
A module worker receives its secrets and environment variables on theenv argument of the fetch handler. Create the Appsignal instance inside the handler, where env is available.
Set up
Add the package to your worker project:fetch handler, and pass caught errors to sendError:
sendError yourself. For the options you can set on the instance, see the configuration section. For the metadata you can add to an error, see the error handling guide.