GithubHelp home page GithubHelp logo

cake-sentry's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

cake-sentry's Issues

Please remove exception swalling and/or provide different configure option to disable it

Code in question:

if (($exception instanceof MissingControllerException || $exception instanceof MissingPluginException) && Configure::read('debug')==0) {
echo 'Cette url n\'est pas valide.';
exit(0);
}

            // Avoid bot scan errors
            if (($exception instanceof MissingControllerException || $exception instanceof MissingPluginException) && Configure::read('debug')==0) {
                echo 'Cette url n\'est pas valide.';
                exit(0);
            }

I'd like to start a discussion to either remove this code or protect with a different Configure variable. My rational:

  • to a certain degree this code is dangerous because in production it will completely swallow certain exceptions which otherwise, with the sentry plugin disabled, would be visible
  • it may not be desirable for other reasons to enabled debug of CakePHP in production

Probably the best course of action would be to make the exit, if it must stay, dependable on configuration settings specific for the CakePHP sentry plugin. E.g. Sentry.avoidBotScanErrors.

The same applies to SentryConsoleErrorHandler, too.

thank you

Not able to use SentryErrorHandler as consoleHandler

Hi @Sandreu!

Thx for the awesome plugin. We introduced it couple of months ago and love the error/exception tracking via sentry. Without your plugin, initial setup would have taken much longer.

Nevertheless, there's an issue with Console Commands (./cake XY test). When adding SentryErrorHandler/ExceptionHandler as consoleHandler as well, the plugin itself sends an error to sentry.

here's my configuration:

Configure::write('Error', array(
    'handler' => 'SentryErrorHandler::handleError',
    'consoleHandler' => 'SentryErrorHandler::handleError',
    'level' => E_ALL & ~E_DEPRECATED,
    'trace' => true
));

Now, when producing a simple error like

App::uses('AppShell', 'Console/Command');

class XYShell extends AppShell {

  public function test() {
    pr([]['foo']);
    die;
  }

}

The error is correctly forwarded to sentry. But, unfortunately, another error is also forwarded. It looks like, parent::handleError is calling ErrorHandler::handleError, instead of ConsoleErrorHandler::handleError().

Because we have defined some session stuff in intializeXY(), the thrown warning looks like "session_start(): Cannot send session cache limiter - headers already sent (output started at โ€ฆ"

screenshot 2014-05-13 18 39 53

I think, using SentryErrorHandler as a ConsoleErrorHandler should not need to create a Controller-class at all.

I tried to build another SentryConsoleErrroHandler, which extends ConsoleErrorHandler, but I received the "class ConsoleErrorHandler missing" error. ๐Ÿ˜’

Do you have any ideas for this problem?

Unable to define Sentry as error handler

Hi,

When I try to define Sentry as the error handler, I get that error :

2014/10/16 23:44:26 [error] 8914#0: *440 FastCGI sent in stderr: "PHP message: PHP Warning:     
set_error_handler() expects the argument (SentryErrorHandler::handleError) to be a valid callback

Any advice ?

Please update instructions to load the plugin

Hi,

have the Plugin up-and-running and it looks very promising. But I did run into some problems during installation because I wasn't using "CakePlugin::loadAll();" in my bootstrap.php file. When I tried to load the library file in core.php, I got an error.

You should update your instructions to mention that the end-user needs to load the plugin in the bootstrap file, either by adding "CakePlugin::load('Sentry');" or "LoadAll()".

Thanks for creating this very helpful plugin.

JavaScript error

Great plugin by the way!

When implementing the JavaScript code in the ReadMe, I get the following error:
"Unexpected token ("
on the line:
$.(function () {

Tried to change it to
jQuery(function(){
But I still don't get any JS error logging with Sentry.

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.