From 475952824e01947d1aa37272fd115a07aca3555a Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Tue, 12 Aug 2025 15:27:51 +0000 Subject: [PATCH] Add documentation for Sentry PHP SDK prefixes configuration option Co-authored-by: michael.hoffmann --- .../php/common/configuration/options.mdx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/platforms/php/common/configuration/options.mdx b/docs/platforms/php/common/configuration/options.mdx index 9e380a767731c..4faa012eefc97 100644 --- a/docs/platforms/php/common/configuration/options.mdx +++ b/docs/platforms/php/common/configuration/options.mdx @@ -93,6 +93,24 @@ This option can be overridden using `in_app_include`. + + +A list of prefixes that should be stripped from the filenames of captured stacktraces to make them relative. This helps in normalizing file paths across different environments. + +For example, if your code is deployed in different locations across environments (e.g., `/var/www/app` in production and `/home/user/projects/app` in development), you can use this option to strip these prefixes and make the paths consistent. + +```php +\Sentry\init([ + 'dsn' => '___DSN___', + 'prefixes' => [ + '/var/www/', + '/home/user/projects/', + ], +]); +``` + + + This parameter controls whether integrations should capture HTTP request bodies. It can be set to one of the following values: