spiral/framework

TelemetryProcessor for Monolog returns wrong type

devnev opened this issue · 0 comments

Description

I am getting an error "[TypeError]\nMonolog\\Logger::handleException(): Argument #2 ($record) must be of type Monolog\\LogRecord, array given, called in /var/www/vendor/monolog/monolog/src/Monolog/Logger.php on line 394\nin vendor/monolog/monolog/src/Monolog/Logger.php:711\n".
I tracked it down to the \Spiral\Telemetry\Monolog\TelemetryProcessor, added as per https://spiral.dev/docs/advanced-telemetry, which returns an array instead of a LogRecord.

How To Reproduce

Additional Info

Q A
Framework Version 3.13.0
PHP version 8.2
Operating system Linux
Monolog version 3.7.0