Welcome to ErrorStream For Laravel
Here we're going to show you how to install the composer package for Laravel and how to integrate it into your project. This package includes monolog integration as well as reporting exceptions.
First, run the following command on the terminal to download and install the package. You can find the package on packagist here and the github repo here
composer require errorstream/errorstream-laravel 3.*

Next, register the service provider in the config/app.php file.

'providers' => [
    // ...

Then add the Facade to the aliases array in the config/app.php file.

'aliases' => [
    // ...
    'ErrorStream' => ErrorStream\ErrorStream\Facades\ErrorStream::class,

Then hook into the App/Exceptions/Handler.php file to send errors to our service.

public function report(Exception $e)
    if ($this->shouldReport($e)) {

Add the following two configuration entries into .env. You can find your API key and project token on the project settings page for the project you wish to integrate.


Finally, add the following to the services.php file.

'errorstream' => [
    'api_token'     => env('ERROR_STREAM_API_TOKEN'),
    'project_token' => env('ERROR_STREAM_PROJECT_TOKEN'),
Adding Tags (Optional)

Anywhere within your application you can append tags on to the reports that you generate and send to errorstream.com. Tags are great for grouping code together. You can make a call to add a tag anywhere by calling addTag():

ErrorStream::addTag('tag text');

A good potential place for tags is in your handler class. Tags are great to represent releases, servers, or other static items. For example:

if ($this->shouldReport($e)) {
Context (Optional)

Context is great for adding more details- a User ID, build number, or even some variable values. You can set these up anywhere in your application. When an error occurs errorstream will send this data over with your error report. If no error occurs, then no event will be triggered.

ErrorStream::addContext('user 51222553');