Heartbeats Pro for PHP.
Simply install the library through Composer. You'll need to use
dev-master until a versioned release has been tagged.
composer require heartbeats/heartbeats@dev-master
You'll need to add two environment variables -
HEARTBEATS_API_TOKEN. You will probably want to create a specific API Token for each environment your app is deployed in. If you want more customisation you can publish the configuration file and edit the options manually.
By default the service provider will inject middleware around your HTTP requests which will collect profiling data. Following the request it will queue the profiling data to be reported to Heartbeats Pro. If you aren't running a queue for your app set the queue driver to
sync - that means it will be handled inline with the request. Note that the reporting will only occur after the response has been sent to the visitor. If you are running a queue ensure it has enough workers to handle the additional load.