This integration allows you to connect to a Sentry project from your Worker to automcatically send errors and uncaught exceptions to Sentry with no code changes needed in the Workers application.
How it works
This integration supports the following Sentry features:
- : As a best practice, do not include PII or other sensitive data in the payload sent to Sentry. HTTP headers (for example,
Cookie) can be removed before events are forwarded to Sentry.
- : Sampling can be configured to manage the number and type of events sent to Sentry. Sampling rates can be configured based on the HTTP status code returned by the Worker and for uncaught exceptions. Setting the sampling rate to 100% sends all events to Sentry or setting it to 30% sends approximately 30% of events to Sentry.
- : Breadcrumbs create a trail of events that happened prior to an issue. Breadcrumbs are automatically forwarded to Sentry in the case of an error or exception. These events consist of the
console.log()from the Worker before the error or exception occurred.
Set up an integration with Sentry
To add the Sentry integration to your Worker:
- Log in to the and select your account.
- Select Workers & Pages.
- In Overview, select your Worker.
- Select Integrations > Sentry.
- Follow the setup flow.