buggregator / server

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

XHProf profiler for laravel #23

Closed webard closed 9 months ago

webard commented 1 year ago

Hello, is it possible to combine the xhrof viewer with laravel?

butschster commented 1 year ago

Hello.

Yes, you can use the Profiler package to integrate XHProf profiler with your Laravel application.

To bind the Profiler classes into the Laravel container, you can refer to the example in the ProfilerBootloader.php file. This example demonstrates how to bootstrap the Profiler and bind it to the Laravel container. I hope this helps! Let me know if you have any further questions.

maantje commented 10 months ago

Created a basic repo to kick off Laravel support. Check it out here. It's functional, but still a work in progress. Your input is welcome! 🛠️

butschster commented 10 months ago

Created a basic repo to kick off Laravel support. Check it out here. It's functional, but still a work in progress. Your input is welcome! 🛠️

Hi @maantje

Thx for the package. I've added it to the project readme!

maantje commented 10 months ago

Hey @butschster,

It's great to know that the package found its way into the project readme.

I've just rolled out a new release that automatically registers the middleware but also introduces support for toggling the profiler using a header, similar to the spiral/profiler package.

I noticed that the "Using buggregator with Docker Compose" section in the project readme is incomplete for Laravel. To make it work with Sail, make sure to add it to the sail network. Without this step, the framework won't be able to establish a connection with the server.

services:
    # ...

    buggregator:
        image: ghcr.io/buggregator/server:dev
        ports:
            - 8000:8000
            - 1025:1025
            - 9912:9912
            - 9913:9913
     networks:
         - sail

Thank you for the effort you put into this; I'm really enjoying using it!

butschster commented 10 months ago

13:9913 networks:

  • sail

It would be great if you create a PR with instruction for Laravel in readme!

butschster commented 9 months ago

Instruction can be found here https://docs.buggregator.dev/config/xhprof.html#laravel

Thx @maantje!