server icon indicating copy to clipboard operation
server copied to clipboard

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

Open mxr576 opened this issue 1 year ago • 1 comments

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.

mxr576 avatar Oct 14 '24 10:10 mxr576

Duplicate of

  • #230

stasadev avatar Oct 28 '24 12:10 stasadev