Sure if exception happend then does’t matter speed of response from the sentry server, but if it is a log to the sentry? Api client will not receive response before log request sent?
As I see under the hood, it uses Guzzle with promises to send request, but Im not sure a response will be sent before the promise is resolved/rejected.
2
Answers
Not if you use jobs for reporting the unhandled exception and for reporting the handled ones.
If you dispatch a job then you must handle infinite loops in case that job fails: https://docs.sentry.io/platforms/php/guides/laravel/usage see queue jobs.
If it uses curl_multi_init then yes the request will take as long as the slowest request. Either way it is synk, blocking the response until all paralel requests are sent and each received an answer(promise response).
The short answer is YES but NOOO. Let me explain
Why YES?
Sentry uses
Guzzle
with asynchronous requests, as you mentioned, to send data to the servers. As usual, it has Life Cycle and runs on server memory in the background.Why NO, then?
Sentry uses Guzzle with promises to send the error data to its server without waiting for a response, allowing the application to continue running without waiting for the process to complete. The main plus point is Sentry can help you identify performance bottlenecks and improve your application’s performance by providing insights into errors and exceptions..
Compared to server performance, this is like nothing to the server. (Because you’re already running a Laravel server)
Tips to optimize
'traces_sample_rate' => 0.5 # Send 50% of the errors
'before_send'
to skip/filter unwanted errorGo through the configuration and play with it.