Skip to content

Conversation

@cleptric
Copy link
Member

@cleptric cleptric commented Sep 9, 2025

Instead of #1034, I decided to allow logging exceptions instead.
While we could emit logs for unhandled exceptions that bubble up to Laravel's error handler, we would miss all captureException() calls.

Attaching an event_id is not feasible either, as we don't know if the event id is a transaction or an error event. The trace correlation from the log to an error event must suffice for now.

Lastly, I had to create a copy of the context in order being able to mutate it, due to https://github.com/Seldaek/monolog/blob/main/src/Monolog/LogRecord.php#L35.

@cleptric cleptric self-assigned this Sep 9, 2025
cleptric and others added 2 commits September 10, 2025 10:36
@cleptric cleptric merged commit b6ba782 into master Sep 10, 2025
34 checks passed
@cleptric cleptric deleted the exception-logging branch September 10, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants