Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestFetcher doesn't work with Sentry\Monolog\BreadcrumbHandler #908

Open
Dukecz opened this issue Jan 16, 2025 · 9 comments
Open

RequestFetcher doesn't work with Sentry\Monolog\BreadcrumbHandler #908

Dukecz opened this issue Jan 16, 2025 · 9 comments

Comments

@Dukecz
Copy link

Dukecz commented Jan 16, 2025

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.

Image

Actual result

Url is missing:

Image

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 16, 2025
@cleptric
Copy link
Member

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.

@Dukecz
Copy link
Author

Dukecz commented Jan 21, 2025

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

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 21, 2025
@Jean85
Copy link
Contributor

Jean85 commented Jan 21, 2025

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).

@cleptric
Copy link
Member

As this doesn't seem to be an issue with the SDK, I'm closing the issue.

@cleptric cleptric closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2025
@Dukecz
Copy link
Author

Dukecz commented Jan 22, 2025

@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:

Image

Image

Without buffer:

Image

Image

@Jean85
Copy link
Contributor

Jean85 commented Jan 23, 2025

So you have a small reproducer? Can you share it with us?

@Dukecz
Copy link
Author

Dukecz commented Jan 23, 2025

So you have a small reproducer? Can you share it with us?

https://github.com/Dukecz/sentrysymfonycommand/tree/sentry-5

@Dukecz
Copy link
Author

Dukecz commented Feb 14, 2025

@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.

@cleptric cleptric reopened this Feb 18, 2025
@cleptric
Copy link
Member

Thanks, we'll take a closer look.

@cleptric cleptric changed the title RequestFetcher doesn't work with Sentry\Monolog\BreadcrumbHandler RequestFetcher doesn't work with Sentry\Monolog\BreadcrumbHandler Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants