DependencyInjection/MonitoringCompilerPass.php
private function createClientDefinition ($rootDir)
    {
        $bugsnagClient = new Definition(Client::class, [
            $this->configuration->getApiKey(),
        ]);
        $bugsnagClient->setFactory([Client::class, "make"]);
        $bugsnagClient->setPublic(false);

        // strip root dir from logs
        $rootDir = dirname($rootDir);
        $bugsnagClient->addMethodCall("setProjectRoot", [$rootDir]);
        $bugsnagClient->addMethodCall("setStripPath", [$rootDir]);
        $bugsnagClient->addMethodCall("setFilters", [['clientIp']]);

        return $bugsnagClient;
    }
private function createClientDefinition ($rootDir)
    {
        $bugsnagClient = new Definition(Client::class, [
            $this->configuration->getApiKey(),
        ]);
        $bugsnagClient->setFactory([Client::class, "make"]);
        $bugsnagClient->setPublic(false);

        // strip root dir from logs
        $rootDir = dirname($rootDir);
        $bugsnagClient->addMethodCall("setProjectRoot", [$rootDir]);
        $bugsnagClient->addMethodCall("setStripPath", [$rootDir]);
        $bugsnagClient->addMethodCall("setFilters", [['clientIp']]);

        return $bugsnagClient;
    }
private function createClientDefinition ( $ rootDir ) { $ bugsnagClient = new Definition ( Client :: class , [ $ this -> configuration -> getApiKey ( ) , ] ) ; $ bugsnagClient -> setFactory ( [ Client :: class , "make" ] ) ; $ bugsnagClient -> setPublic ( false ) ; // strip root dir from logs $ rootDir = dirname ( $ rootDir ) ; $ bugsnagClient -> addMethodCall ( "setProjectRoot" , [ $ rootDir ] ) ; $ bugsnagClient -> addMethodCall ( "setStripPath" , [ $ rootDir ] ) ; $ bugsnagClient -> addMethodCall ( "setFilters" , [ [ 'clientIp' ] ] ) ; return $ bugsnagClient ; }
Creates the bugsnag client

@param string $rootDir

@return Definition
Creates the bugsnag client