We’re using “sentry/sdk” 3.1 in PHP.
We’d like to ignore a certain type of exception. It appears the recommended way to do this is by using the ‘before_send’ callback method:
‘before_send’ => function (\Sentry\Event $event): ?\Sentry\Event {
// return null or the $event - null to stop the event from being sent
}
When I dump what the $event variable contains - to my surprise it had an array of exceptions, and not the single exception that fired the event.
What is the best way to implement this - it feels like looping through an array and checking each element for the existence of our exception we want to ignore, and then returning null is heavy handed.