Skip to content

crawly/mezzio-sentry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MezzioSentry

Latest Stable Version Total Downloads License

Mezzio integration for Sentry (http://getsentry.com)

Dependencies

  • PHP 7.3+

Installation

Installation of MezzioSentry is only officially supported using Composer:

php composer.phar require 'crawly/mezzio-sentry'

Usage

Library configuration

If the module was not automatically registered by composer, you need to enable the module by adding it to the list of registered modules in the config/config.php file of your project.

// config/config.php

$aggregator = new ConfigAggregator([

    // MezzioSentry configuration
    \MezzioSentry\ConfigProvider::class,
  
    // ...
    
], $cacheConfig['config_cache_path']);

Options

Here are the all options available

Option name Default Description
dsn @$_SERVER['sentry_dsn'] Get Sentry DSN from a environment variable
development-environment false Enable or disable in development environment

Configuration file example

// config/autoload/sentry.global.php

<?php

return [
    'sentry' => [
        'dsn' => 'https://[email protected]',
        'development-environment' => true,
    ],
];