GithubHelp home page GithubHelp logo

geo6 / zend-expressive-sentry Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 40 KB

Zend Expressive ErrorHandler able to send error to Sentry.io

License: GNU General Public License v3.0

PHP 100.00%
zend-expressive sentry sentry-php error-handler php

zend-expressive-sentry's Introduction

Zend Expressive Sentry ErrorHandler

Latest Stable Version Total Downloads Monthly Downloads Software License

This library enables Zend Expressive to send errors and exceptions to Sentry.io.

Install

composer require geo6/zend-expressive-sentry

Configuration

Create a sentry.global.php file in your config directory with your correct DSN (and options, if necessary):

<?php

declare(strict_types=1);

return [
    'sentry' => [
        'dsn' => 'https://[email protected]/12345',
    ],
];

Usage

To enable it, you just have to add Geo6\Expressive\Sentry\ConfigProvider::class to your main configuration (usually config/config.php):

...

$aggregator = new ConfigAggregator([
+     Geo6\Expressive\Sentry\ConfigProvider::class,
...
], $cacheConfig['config_cache_path']);

...

The Sentry ErrorHandler will be active only in "production mode" (when $config['debug] is false).
To switch to "production mode", you can use composer run development-disable.


This library was inspired by stickeeuk/zend-expressive-sentry.
The main difference is that this library uses the last version of the PHP SDK.

zend-expressive-sentry's People

Contributors

jbelien avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.