marcopollacci/sentryexpressive

Utility to connect Zend Expressive Framework to Sentry

1.0 2019-06-19 07:17 UTC

This package is auto-updated.

Last update: 2024-04-19 23:15:45 UTC


README

Build Status Maintainability Latest Stable Version Total Downloads License composer.lock

Average time to resolve an issue Percentage of issues still open

Sentry Delegator for Zend Expressive Framework

Install by Composer

composer require marcopollacci/sentryexpressive

Usage

  1. Set at your config file with sentry token and dsn (if no config given, no exception send to sentry). Es:
return [
    'sentry' => [
        'dsn' => 'https://<your url>>/<your id>',
        'environment' => 'produzione' #optional
    ]
];
  1. Enjoy it :D!

Additional usage in try / catch statament

Code Example

        try {
            throw new \Exception('something');
        }catch(\Exception $e){
            \Sentry\captureException($e);
            /* something else you want */
        }