RequestFetcher doesn't work with `Sentry\Monolog\BreadcrumbHandler`
How do you use Sentry?
Self-hosted / on-premises
SDK version
5.1.0
Steps to reproduce
With Sentry\Monolog\BreadcrumbHandler setup as here https://docs.sentry.io/platforms/php/guides/symfony/integrations/monolog/ the request in RequestFetcher keeps resetting to null so data like url are not sent to Sentry.
Expected result
Event request data like url are visible in Sentry.
Actual result
Url is missing:
I don't see the correlation between breadcrumbs and the request fetcher, so please provide us with more infos, such as Symfony versions, how your app is run, etc.
After further testing I have found out the problem is not BreadcrumbHandler but monolog buffer:
https://github.com/Dukecz/sentrysymfonycommand/blob/sentry-5/config/packages/monolog.yaml#L19
The Monolog buffer has a specific option to avoid this specific issue, buffer_size, which limits the amount of log that are retained in memory (oldest are discarded).
As this doesn't seem to be an issue with the SDK, I'm closing the issue.
@Jean85 buffer_size is unlimited by default, you can put whatever number you want and the problem persists. No messages are lost, they are just missing some data from RequestFetcher
@cleptric I am asking for reopen (and can rename title) as imo the RequestFetcher doesnt work with monolog buffer.
With unlimited buffer:
Without buffer:
So you have a small reproducer? Can you share it with us?
So you have a small reproducer? Can you share it with us?
https://github.com/Dukecz/sentrysymfonycommand/tree/sentry-5
@Jean85 @cleptric have you checked the exampled project? All you need to do is just set sentry url and open homepage with https://github.com/Dukecz/sentrysymfonycommand/blob/sentry-5/config/packages/monolog.yaml#L20 sentry buffer enabled/disabled.
Thanks, we'll take a closer look.
I'll take this one. I'm on it, the reproducer is setup. Let's dive to find the root cause.
https://sentry.zendesk.com/agent/tickets/157319