2017 © Pedro Peláez
 

library errorstream-laravel

Laravel Package for ErrorStream.com integration

image

errorstream/errorstream-laravel

Laravel Package for ErrorStream.com integration

  • Tuesday, May 1, 2018
  • by kevinh448
  • Repository
  • 1 Watchers
  • 8 Stars
  • 12,499 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 10 Versions
  • 11 % Grown

The README.md

errorstream-laravel

Laravel integration with Errorstream., (*1)

Installation Instructions

First, run the following command on the terminal to download and install the package, (*2)

composer require errorstream/errorstream-laravel 3.*

Next, register the service provider in the config/app.php file., (*3)

'providers' => [
     // ...
     ErrorStream\ErrorStream\ErrorStreamServiceProvider::class,
]

Then add the Facade to the aliases array in the config/app.php file., (*4)

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

Then hook into the App/Exceptions/Handler.php file to send errors to our service., (*5)

public function report(Exception $e)
{
    if ($this->shouldReport($exception) && config('services.errorstream.enabled')) {
        ErrorStream::reportException($exception);
    }
     parent::report($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., (*6)

ERROR_STREAM_API_TOKEN=YOUR_API_TOKEN
ERROR_STREAM_PROJECT_TOKEN=YOUR_PROJECT_TOKEN
ERROR_STREAM_ENABLED=1

Finally, Add the errorstream config entries in your config/services.php, (*7)

'errorstream' => [
    'api_token'     => env('ERROR_STREAM_API_TOKEN'),
    'project_token' => env('ERROR_STREAM_PROJECT_TOKEN'),
    'enabled'       => env('ERROR_STREAM_ENABLED'),
],

Tagging

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(). A great place to do this would be to extend your Handler class modifications. For example:, (*8)

public function report(Exception $e)
{
     if ($this->shouldReport($e)) {
          ErrorStream::addTag('v1.0.2');
          ErrorStream::reportException($e);
     }
     parent::report($e);
}

Adding Context

Sometimes you'll need additional information in order to diagnose issues. Context is great for adding more information to errors. Maybe you want to send a build number, user id, or anything else. You can use this in anywhere in your laravel application, (*9)

ErrorStream::addContext('some more details about variables that are set');

The Versions

01/05 2018

dev-master

9999999-dev http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream

01/05 2018

4.1

4.1.0.0 http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream

30/04 2018

4.0

4.0.0.0 http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream

23/07 2016

3.1

3.1.0.0 http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream

23/07 2016

3.0

3.0.0.0 http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream

29/06 2016

2.0

2.0.0.0 http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream

29/06 2016

dev-kevin

dev-kevin http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream

03/06 2016

1.1

1.1.0.0 http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream

29/05 2016

1.0

1.0.0.0 http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream

29/05 2016

dev-development

dev-development http://errorstream.com

Laravel Package for ErrorStream.com integration

  Sources   Download

Apache-2.0

The Requires

 

laravel logging errors errorstream