2017 © Pedro Peláez
 

library zend-expressive-sentry

Sentry Error Logging for Zend Expressive

image

orkin/zend-expressive-sentry

Sentry Error Logging for Zend Expressive

  • Wednesday, July 11, 2018
  • by Orkin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 112 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Zend Expressive Sentry

This is a quick addon for Zend Expressive to allow it to report it's errors to Sentry, (*1)

Configuration instructions

Add the class \Stickee\Sentry\ConfigProvider to your main config aggregation, (*2)

For example:-, (*3)

<?php

use Zend\ConfigAggregator\ArrayProvider;
use Zend\ConfigAggregator\ConfigAggregator;
use Zend\ConfigAggregator\PhpFileProvider;

$cacheConfig = [
    'config_cache_path' => 'data/config-cache.php',
];

$aggregator = new ConfigAggregator(
    [
        \Stickee\Sentry\ConfigProvider::class,

        // Include cache configuration
        new ArrayProvider($cacheConfig),

        // Default App module config
        \App\ConfigProvider::class,

        // Load application config in a pre-defined order in such a way that local settings
        // overwrite global settings. (Loaded as first to last):
        //   - `global.php`
        //   - `*.global.php`
        //   - `local.php`
        //   - `*.local.php`
        new PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),

        // Load development config if it exists
        new PhpFileProvider('config/development.config.php'),
    ], $cacheConfig['config_cache_path']
);

return $aggregator->getMergedConfig();

This will then automatically add Sentry as an error listener., (*4)

You can configure the DSN by defining it in your config files - we suggest copying config/sentry.global.php.dist to your app's config/autoload and renaming it to sentry.global.php - add in your DSN (or set the environment variable) and you're all done!, (*5)

The Versions

11/07 2018

dev-master

9999999-dev

Sentry Error Logging for Zend Expressive

  Sources   Download

MIT

The Requires

 

11/07 2018
28/06 2018
27/07 2017