Laravel API adapter to track each http request app handled.
Laravel version | Package version | Composer command |
---|---|---|
5.3.x | 3.0.x | composer require "lezhnev74/apideveloperio-laravel=~3.0" |
5.4.x | 4.0.x | composer require "lezhnev74/apideveloperio-laravel=~4.0" |
composer require "lezhnev74/apideveloperio-laravel=~3.0"
'providers' => [
...
'\HttpAnalyzer\Laravel\HttpAnalyzerServiceProvider'
],
php artisan vendor:publish --provider="HttpAnalyzer\Laravel\HttpAnalyzerServiceProvider"
To dump recorded requests to the Dashboard. Open your app/Console/Kernel.php
and add class to commands list.
#app/Console/Kernel.php
....
protected $commands = [
...
'\HttpAnalyzer\Laravel\DumpRecordedRequests',
];
...
protected function schedule(Schedule $schedule)
{
// you can set how often you want it to dump your requests to the Dashboard
// every minute is the most frequent mode
$schedule->command('http_analyzer:dump')->everyMinute();
}
After publishing, config file will be located at config/http_analyzer.php
and speaks for himself.
The only required configuration is to put your API Key under api_key
field.
It hooks into Laravel app and records request, response and other data that you will see in your Dashboard:
- incoming request
- response
- database queries
- log entries
You can tweak which information you would like to send to the Dashboard.
The command http_analyzer:dump
that you have set up will send all recorded requests to your Dashboard.
This package is designed to fail silently. If something went wrong while recording your requests - plugin won't interrupt your request lifecycle. Open your log and see if the package appended any critical information in there.
Also check the tmp storage folder if there are any stale dump files.
That happens due to some Symfony's Request issue. Try using this package - https://github.com/fideloper/TrustedProxy. Should do the trick.
When someone refers to particular request/response app cycle, it is best to know it's unique ID. Knowing it you can easily find it in the Dashboard. Just add a middleware (like this one https://github.com/softonic/laravel-middleware-request-id) which will append a unique ID to each response your app provides.
Just open a new Issue here and get help.