Skip to main content

Can I control the event type between default and error?

Issue

I see that some of my events have event.type set to error and some have event.type set to default. I want to know whether I can set this value manually.

Applies To

  • All SaaS Customers

  • Error Monitoring

Resolution

Sentry derives event.type from how you capture the event:

  • Events captured with Sentry.captureException() have event.type set to error.

  • Events captured with Sentry.captureMessage() have event.type set to default.

Sentry assigns the default type to events, and the issues created from them, that are not exceptions or errors.

You cannot set event.type directly. Sentry derives it from the event content during ingest, so changing it in a callback such as beforeSend has no effect. The only way to control it is through the method you use to capture the event.

For details on capturing errors and messages, see the Sentry usage documentation.

Did this answer your question?