Giter VIP home page Giter VIP logo

Comments (5)

CookiesEater avatar CookiesEater commented on June 9, 2024 1

Fixed in 1.5.1. Thanks for participating!

from yii2-sentry.

CookiesEater avatar CookiesEater commented on June 9, 2024

Hi! I checked with provided config but could not reproduce (always it was 1 event in sentry)

Can you check whole Yii config, please? May be there are have 2 target for sentry

from yii2-sentry.

aebnoether-backoffice avatar aebnoether-backoffice commented on June 9, 2024

(Me and @rainerCH are work colleagues and we work on the same problem)

I further investigated this Issue. In my opinion it is more than likely that the Issue is related to this change: 3d26767#diff-6c9daa1dd1ea6db50b80e139ed98b740R46

For some reason Sentry is initiated as soon as the constructor of notamedia\sentry\SentryTarget is called. When Sentry is initiated it registers an exception handler which is called upon the occurrence of any PHP Exception. When a PHP-Exception occurrs, first the exception handler of Sentry is called and it pushes the exception to the sentry server. Then the Yii2 Logging mechanism triggers which in turn uses this package as a target. That is why all exceptions are pushed two times to Sentry.

Before we used Version 1.5.0 and this problem did not occurr. This fact further increases my confidence that the problem is related to the said change.

Why is Sentry initiated when the constructor of notamedia\sentry\SentryTarget is called? Is there a way to disable this behaviour?

Thanks in advance!

from yii2-sentry.

CookiesEater avatar CookiesEater commented on June 9, 2024

Thank you for paying attention to this!

Init Sentry in construct is needed to configure Sentry Scope before error was handled (for example, add to all error some additional data in global config)

This problem was caused because Sentry has it's own integration (https://docs.sentry.io/platforms/php/default-integrations/) to catch PHP errors

Can you check please this issue with fix in #42 ?

from yii2-sentry.

rainerCH avatar rainerCH commented on June 9, 2024

Hi @CookiesEater

seems to work for me :)

thanks!
Rainer

from yii2-sentry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.