public function register(Container $app)
    {
        $app['bugsnag.resolver'] = function () {
            return new SilexResolver();
        };

        $app['bugsnag'] = function () use ($app) {
            return $this->makeClient($app);
        };

        $app['bugsnag.notifier'] = function() use ($app) {
            return function($error) use ($app) {
                $this->autoNotify($app['bugsnag'], $error);
            };
        };

        $app->before(function (Request $request) use ($app) {
            $app['bugsnag']->setFallbackType('HTTP');
            $app['bugsnag.resolver']->set($request);
        }, Application::EARLY_EVENT);
    }