Is Sentry SDK for PHP using a queue when sending data? #691
-
When en exception is captured, this package calls sentry/sdk wich queues the request and then the process continues leaving the sdk job to send the exception to sentry.io? Or it is a sync request to sentry.io? I saw promises are used. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Hi @marius-ciclistu, short answer: currently everything is sent synchronously. There is a exception, and that is for transactions from the performance part of the Sentry SDK, these are sent in a terminable middleware and are thus sent after the response is sent. So the errors/exception are sent immediately (could have impact on response times), and performance tracing is sent after the response is sent to the client (so should not have any impact on response times). There are some ways to improve response times and/or lower the impact of sending data: https://docs.sentry.io/platforms/php/performance/#improve-response-time. We used to have asynchronous sending (as far as that was possible in PHP) that's why the promises are still in the code. |
Beta Was this translation helpful? Give feedback.
Hi @marius-ciclistu, short answer: currently everything is sent synchronously.
There is a exception, and that is for transactions from the performance part of the Sentry SDK, these are sent in a terminable middleware and are thus sent after the response is sent.
So the errors/exception are sent immediately (could have impact on response times), and performance tracing is sent after the response is sent to the client (so should not have any impact on response times).
There are some ways to improve response times and/or lower the impact of sending data: https://docs.sentry.io/platforms/php/performance/#improve-response-time.
We used to have asynchronous sending (as far as that was possible …