Same PHP errors duplicated for different releases in different folder

Hi All,

I have a PHP website. I am having trouble grouping PHP errors across releases because the directory structure under the website changes.


Uncaught InvalidArgumentException: XXXX
/var/www/ .....


Uncaught InvalidArgumentException: XXXX
/var/www/ .....

Is there a way to specify a base path?

Best wishes,


I might not be overly helpful, but in the older PHP SDK (sentry/sentry < 2.x) there was a “app_paths” configuration which let you set base paths that we’d strip/look for.

Which version of the SDK are you using?

Version >=2.0 the option is called project_root.

Hi @zeeg @HazAT,

Thanks a bunch for the replies! app_paths looks like what I want so I’ll give that a try and report back. :smile:

Unfortunately I was unable to use SDK >=2.0 which is still in beta due to a dependency in composer:

$ composer require sentry/sentry:^2@beta
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- sentry/sentry 2.0.0-beta2 requires php-http/async-client-implementation ^1.0 -&gt; no matching package found.
- sentry/sentry 2.0.0-beta1 requires php-http/async-client-implementation ^1.0 -&gt; no matching package found.
- Installation request for sentry/sentry ^2@beta -&gt; satisfiable by sentry/sentry[2.0.0-beta1, 2.0.0-beta2].

My setup looks like:

$client = new \Raven_Client($this->siteConfig->sentryErrorReportingUrl, [
    'app_path' => realpath($this->siteConfig->appPath),

Thanks again,

Hey, can you try to run

composer require sentry/sentry:2.0.0-beta2 php-http/curl-client guzzlehttp/psr7

this should fix it. The install command will sonn be simplified.
Also check for code updates.

We just released the stable version 2.0.0 today, you should be able to install it now with:

composer require sentry/sdk

This will install the latest version of the PHP SDK + the http client we recommend.

1 Like