on execute
private function cleanupPendingRequests()
} catch (\Throwable $exception) {
dump($exception);
// Do nothing because an exception thrown from a destructor
// can't be catched in PHP (see http://php.net/manual/en/language.oop5.decon.php#language.oop5.decon.destructor)
}
recive uncatched error
'Request Entity Too Large'
how to fix this and don't lose errors?
i think problem in very big stack trace.
I don't know specifically what's the data that is too big, but generally speaking the payload that is being sent to the server is too big and it rejects it. It's not something that we can fix in the SDK itself since it depends on the amount of information that you are gathering. You could try to debug your application and trim the data that is too big using the before_send option, an event processor or something like that
i use laravel
app('sentry')->captureException($exception);
can you give some example how I can trim data?
i see in my case $exception has very big trace
ok
i found solution for me
in config/sentry.php
'before_send' => function ($event) {
$exs=$event->getExceptions();
if(is_array($exs))
foreach($exs as $k=>$ex)
{
$c=count($ex['stacktrace']->toArray());
if($c>50)
for($i=0;$i<($c-50);$i++)
{
$ex['stacktrace']->removeFrame(0);
}
$exs[$k]=$ex;
}
$event->setExceptions($exs);
return $event;
}
Closing this since you solved your problem.