Laravel Vapor
How to make Inspector works on Laravel Vapor.
When using Vapor you have to enable the "serverless" flag in the Application Settings.
Use the default Vapor runtime
Behind the scene, Inspector uses curl
to send data from your application to the monitoring system. In the default Vapor runtime curl is available in custom path, so you need to let the package know this path to properly build the curl command to send the data.
The package has an option for this configuration. You just need to publish the Inspector configuration file using the command below:
After publishing the config/inspector.php
file you can customize the curlPath field in the "options" property:
Test and Deploy
You can run the test command to verify everything is well configured before deploy in production:
Use Docker runtime
Docker based runtimes offer much more control over the execution environment, so you can deploy applications up to 10GB in size and allow you to install additional PHP extensions or libraries.
In order to use a Docker image instead of the Vapor native runtimes, set the runtime
configuration option to docker
within your vapor.yml
file:
Learn more about Docker runtime in Vapor.
To make Inspector works you must be sure that the current PHP installation in the Docker image has proc_open, and proc_close native functions enabled.
The default Docker runtime should have these functions enabled by default. In alternative you need to create a custom php.ini
file in your project root directory with these two functions not listed in the disable_functions parameter:
Add the entry below in your environment .Dockerfile
to override the default php.ini
configuration:
Now you can continue installing the library as usual: https://docs.inspector.dev/guides/laravel/installation
Last updated