Skip to content

Commit 0e14961

Browse files
authored
Document undocumented php prefix option (#14634)
1 parent 5a405b9 commit 0e14961

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/platforms/php/common/configuration/options.mdx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,24 @@ This option can be overridden using `in_app_include`.
9393

9494
</SdkOption>
9595

96+
<SdkOption name="prefixes" type='string[]' defaultValue='[]'>
97+
98+
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.
99+
100+
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.
101+
102+
```php
103+
\Sentry\init([
104+
'dsn' => '___DSN___',
105+
'prefixes' => [
106+
'/var/www/',
107+
'/home/user/projects/',
108+
],
109+
]);
110+
```
111+
112+
</SdkOption>
113+
96114
<SdkOption name="max_request_body_size"type='string' defaultValue='medium'>
97115

98116
This parameter controls whether integrations should capture HTTP request bodies. It can be set to one of the following values:

0 commit comments

Comments
 (0)