spiral / framework

High-Performance PHP Framework
https://spiral.dev
MIT License
1.82k stars 89 forks source link

TelemetryProcessor for Monolog returns wrong type #1153

Open devnev opened 1 month ago

devnev commented 1 month ago

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