Skip to content

Commit c647e65

Browse files
committed
Add note about local dev and testing to all PHP docs
1 parent 1d0c73a commit c647e65

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

docs/platforms/php/guides/symfony/index.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,13 @@ class SentryTestController extends AbstractController
9292
```
9393

9494
After you visit the `/_sentry-test` page, you can view and resolve the recorded error by logging into [sentry.io](https://sentry.io) and opening your project. Clicking on the error's title will open a page where you can see detailed information and mark it as resolved.
95+
96+
## Local Development and Testing
97+
98+
When Sentry is installed in your application, it will also be active when you are developing or running tests. Because PHP is single-threaded, Sentry will send events synchronously, which can slow down your application or test suite.
99+
100+
You most likely don't want errors to be sent to Sentry when you are developing or running tests so they don't use up [quota](/pricing/quotas/). To avoid this, set the DSN value to `null` to disable sending errors to Sentry.
101+
102+
You can also do this by not defining `SENTRY_DSN` in your `.env` or by defining it as `SENTRY_DSN=null`.
103+
104+
If you want to use Sentry in your local development environment, you can use [Spotlight](https://spotlightjs.com/) which runs locally on your machine.

docs/platforms/php/index.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,11 @@ try {
8080
If you're using Laravel's Forge platform to provision and deploy your PHP application, you can create a Sentry organization through [Forge](https://forge.laravel.com/docs/integrations/sentry.html).
8181

8282
![Sentry and Forge](./img/forge-sentry.png)
83+
84+
## Local Development and Testing
85+
86+
When Sentry is installed in your application, it will also be active when you are developing or running tests. Because PHP is single-threaded, Sentry will send events synchronously, which can slow down your application or test suite.
87+
88+
You most likely don't want errors to be sent to Sentry when you are developing or running tests so they don't use up [quota](/pricing/quotas/). To avoid this, set the DSN value to `null` to disable sending errors to Sentry.
89+
90+
If you want to use Sentry in your local development environment, you can use [Spotlight](https://spotlightjs.com/) which runs locally on your machine.

0 commit comments

Comments
 (0)