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

Always in same error #7

Open
triasrahman opened this issue Mar 7, 2016 · 3 comments
Open

Always in same error #7

triasrahman opened this issue Mar 7, 2016 · 3 comments

Comments

@triasrahman
Copy link

Hi, I have a problem when integrating it on my app. Every error always point to same stacktrace (BugsnagHandler:58). So I can't discover every error happens. How to solve this? Please help. Thanks.

screen shot 2016-03-07 at 10 27 32 pm

@meadsteve
Copy link
Owner

@triasrahman Does the error being triggered have an exception in the context? If it does then monosnag should be passing the exception through to bugsnag:
https://github.com/meadsteve/MonoSnag/blob/master/src/BugsnagHandler.php#L46

@stevenmusumeche
Copy link

I am having the same issue, all errors that are logged end up as the same error in bugsnag.

@gallofeliz
Copy link

Hi guys,

I use this code :

` $bugsnagClient->registerCallback(function ($report) {
$stacktrace = $report->getStacktrace();

        // Monolog uses MonoSnag for logs, and bugsnag handler logs directly
        $isAMonologHandledLog = $stacktrace->getFrames()[0]['method'] === 'MeadSteve\MonoSnag\BugsnagHandler::write';

        if (!$isAMonologHandledLog) {
            // Do nothing
            return;
        }

        // Remove The first frame
        $stacktrace->removeFrame(0);

        // Remove all the trace about Monolog as it's not interesting
        while(substr($stacktrace->getFrames()[0]['method'], 0, 8) === 'Monolog\\') {
            $stacktrace->removeFrame(0);
        }

    });`

But should be good that the handler does that.

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

4 participants