-
-
Notifications
You must be signed in to change notification settings - Fork 461
Closed
Labels
Description
Some of my calls to Monolog contain additional data in the $context
array. I need to get some of these data into the \Sentry\Event
object. I want to use an event processor for that since it gets both the Event instance and the original $payload
array (see #1010).
The issue is that the data I need don't make it into the $payload
array at the moment. The Monolog Handler only copies the exception but the rest of $record['context']
is thrown away:
sentry-php/src/Monolog/Handler.php
Lines 53 to 55 in 97bbca2
if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) { | |
$payload['exception'] = $record['context']['exception']; | |
} |
Do I have to write my own Monolog Handler for this or can we improve the existing one in this library to pass the data into the payload?