[GH-ISSUE #759] PHP7 Raven Handler #289

Closed
opened 2026-03-04 02:13:51 +03:00 by kerem · 8 comments
Owner

Originally created by @bassrock on GitHub (Mar 29, 2016).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/759

I just recently switched to PHP 7 and I began to notice that errors are no longer being sent to Sentry with the Raven Handler. Nothing in the Raven configuration changed, and I am able to log messages by hand with the Raven Client.

Is the Monolog Raven Handler and PHP 7 known to work?

Originally created by @bassrock on GitHub (Mar 29, 2016). Original GitHub issue: https://github.com/Seldaek/monolog/issues/759 I just recently switched to PHP 7 and I began to notice that errors are no longer being sent to Sentry with the Raven Handler. Nothing in the Raven configuration changed, and I am able to log messages by hand with the Raven Client. Is the Monolog Raven Handler and PHP 7 known to work?
kerem closed this issue 2026-03-04 02:13:51 +03:00
Author
Owner

@Seldaek commented on GitHub (Apr 1, 2016):

There isn't much code in https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/RavenHandler.php so if anything I'd guess it's the RavenPHP code but their test suite seems to pass on php7 so I don't know.. Best talk to them I think. Ping @dcramer @msabramo

<!-- gh-comment-id:204435086 --> @Seldaek commented on GitHub (Apr 1, 2016): There isn't much code in https://github.com/Seldaek/monolog/blob/master/src/Monolog/Handler/RavenHandler.php so if anything I'd guess it's the RavenPHP code but their test suite seems to pass on php7 so I don't know.. Best talk to them I think. Ping @dcramer @msabramo
Author
Owner

@mitsuhiko commented on GitHub (Apr 21, 2016):

We're seeing various reports that the monolog handler no longer sends stacktraces in laravel. I did some testing myself and I can't see anything passing in the stacktrace. It now appears to be part of the message.

<!-- gh-comment-id:212898564 --> @mitsuhiko commented on GitHub (Apr 21, 2016): We're seeing various reports that the monolog handler no longer sends stacktraces in laravel. I did some testing myself and I can't see anything passing in the stacktrace. It now appears to be part of the message.
Author
Owner

@mitsuhiko commented on GitHub (Apr 21, 2016):

(That to the best of my knowledge is not an issue with PHP 7)

<!-- gh-comment-id:212898814 --> @mitsuhiko commented on GitHub (Apr 21, 2016): (That to the best of my knowledge is not an issue with PHP 7)
Author
Owner

@Seldaek commented on GitHub (Apr 21, 2016):

So it's not PHP7.. but it is laravel specific? As far as I can tell in https://github.com/Seldaek/monolog/blob/1.x/src/Monolog/Handler/RavenHandler.php#L184 we pass the exception object directly if it is given to us in a standard way (i.e. exception key in the record's context data, which follows PSR-3 standard). If it is only laravel it could be they changed the way they log exceptions to monolog? cc @taylorotwell

<!-- gh-comment-id:212912376 --> @Seldaek commented on GitHub (Apr 21, 2016): So it's not PHP7.. but it is laravel specific? As far as I can tell in https://github.com/Seldaek/monolog/blob/1.x/src/Monolog/Handler/RavenHandler.php#L184 we pass the exception object directly if it is given to us in a standard way (i.e. exception key in the record's context data, which follows PSR-3 standard). If it is only laravel it could be they changed the way they log exceptions to monolog? cc @taylorotwell
Author
Owner

@antoniofrignani commented on GitHub (Apr 21, 2016):

We have this exact problem on a Laravel 4 application running on php 5.6. The stack trace is passed to the raven client as expected, but it gets displayed as a full text log in the additional data section of the Sentry application. The Raven php sdk version is at 0.12, but the same (tested) issue arise with the latest 0.13

<!-- gh-comment-id:212979063 --> @antoniofrignani commented on GitHub (Apr 21, 2016): We have this exact problem on a Laravel 4 application running on php 5.6. The stack trace is passed to the raven client as expected, but it gets displayed as a full text log in the additional data section of the Sentry application. The Raven php sdk version is at 0.12, but the same (tested) issue arise with the latest 0.13
Author
Owner

@Seldaek commented on GitHub (May 26, 2016):

Anyone figured this one out? Sorry but it's a bit too involved for me to try and reproduce.

<!-- gh-comment-id:222004843 --> @Seldaek commented on GitHub (May 26, 2016): Anyone figured this one out? Sorry but it's a bit too involved for me to try and reproduce.
Author
Owner

@AkenRoberts commented on GitHub (Jun 10, 2016):

I'm fairly certain this is mostly on Sentry's end. See: https://github.com/getsentry/sentry-php/issues/312

<!-- gh-comment-id:225245186 --> @AkenRoberts commented on GitHub (Jun 10, 2016): I'm fairly certain this is mostly on Sentry's end. See: https://github.com/getsentry/sentry-php/issues/312
Author
Owner

@Seldaek commented on GitHub (Sep 18, 2016):

#834 might be fixing this.. Let me know if it works with the latest 1.x-dev installed.

<!-- gh-comment-id:247860126 --> @Seldaek commented on GitHub (Sep 18, 2016): #834 might be fixing this.. Let me know if it works with the latest `1.x-dev` installed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/monolog#289
No description provided.