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

Duplicated logs #618

Closed
miedzikd opened this issue Apr 15, 2022 · 5 comments
Closed

Duplicated logs #618

miedzikd opened this issue Apr 15, 2022 · 5 comments

Comments

@miedzikd
Copy link

Environment

How do you use Sentry?
Sentry SaaS (sentry.io)

Which SDK and version?
e.g: Symfony, 4.2.8

Steps to Reproduce

  1. Install fresh symfony project
  2. follow guide from docs
  3. open test page

To make this easier to test for you I created a repo (here)

Expected Result

I should see only one error with additional information from the logger

Actual Result

I see two errors.
ScreenShot 2022-04-15 15-24-27

if I understood the documentation correctly, using the option register_error_listener = false should stop duplicate logs in Sentry. Unfortunately, this is not true.

@Jean85
Copy link
Contributor

Jean85 commented Apr 15, 2022

Looking at your code, this is absolutely normal: you logged a message with an error level (an you get the first event) and then you throw an uncaught exception (generating the second event).

@miedzikd
Copy link
Author

Thanks @Jean85 Heh :) So I misunderstand docs...
But when I logged a message with an info level - can be this included in the event?

@Jean85
Copy link
Contributor

Jean85 commented Apr 19, 2022

To add that to an event, you need Breadcrumbs. To transfer Monolog entries into breadcrumbs, you would need getsentry/sentry-php#1199, which is not released yet.

@github-actions
Copy link

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

@miedzikd
Copy link
Author

@Jean85 do you know if this PR will be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants