Skip to content
Expressive Delegator for Sentry
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


This is an expressive delegator for the service Sentry utilizing Sentry's latest PHP SDK. The only required config is your Sentry project DSN. You can optionally add an environment, which will automatically be registered in your expressive application. Below is an example config.

return [
  'sentry' => [
    'dsn' => '[project dsn]',
    'environment' => '[environment]',


You can install SentryDelegator using Composer:

$ composer require tigerman55/sentry-delegator


To bind your configuration to Sentry, you'll need to invoke the following somewhere early in your application. One option, is to put this in index.php right after the container initialization.

(new ConfigureSentry())($container->get('config'))

Advanced Usage

Sentry context is supported with this delegator. To add context, simply add the following in the appropriate middleware:

Sentry\configureScope(function (Scope $scope) use ($context) : void {
        'email'    => $context['email'],
        'username' => $context['username'],
You can’t perform that action at this time.