buggregator / server

Buggregator is a lightweight, standalone server that offers a range of debugging features for PHP applications.
https://buggregator.dev/
Other
703 stars 26 forks source link

ErrorException: Undefined array key "cpu" in /app/app/modules/Profiler/Application/Handlers/CalculateDiffsBetweenEdges.php at line 23 [] [] #259

Open mxr576 opened 1 month ago

mxr576 commented 1 month ago

I was tested Buggregator's profiler via XHPROF. I use DDEV as local dev environment and I took more some time figuring out why I also get back HTTP 500 from Buggregator for a profiling request by following the Vanilla PHP instructions.

This is what I managed to extract from the Buggregator Docker container as issue:

2024-10-14T09:53:35+0000        ERROR   app             ErrorException: Undefined array key "cpu" in /app/app/modules/Profiler/Application/Handlers/CalculateDiffsBetweenEdges.php at line 23 [] []`

and it seems the root cause is that in DDEV CPU profiling got disabled by default for a long time (see https://github.com/ddev/ddev/commit/5efc9c18aa97fa17453d44a1ff2c5cd04d3c8b00#diff-3ae14f06b135abe5b6ad9e0d247f73280b0a6e83ad5346e5db5a515931ea5f69L23) which probably also means the Buggregator should be prepared for handling missing CPU usage info as well.

Restoring CPU profiling in DDEV's XHPROF config fixed profile data push to Buggregator.

stasadev commented 3 weeks ago

Duplicate of