Skip to content

Commit

Permalink
Add note about local dev and testing to all PHP docs
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive committed Oct 9, 2024
1 parent 1d0c73a commit c647e65
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/platforms/php/guides/symfony/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,13 @@ class SentryTestController extends AbstractController
```

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.

## Local Development and Testing

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.

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.

You can also do this by not defining `SENTRY_DSN` in your `.env` or by defining it as `SENTRY_DSN=null`.

If you want to use Sentry in your local development environment, you can use [Spotlight](https://spotlightjs.com/) which runs locally on your machine.
8 changes: 8 additions & 0 deletions docs/platforms/php/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,11 @@ try {
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).

![Sentry and Forge](./img/forge-sentry.png)

## Local Development and Testing

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.

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.

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 comments on commit c647e65

Please sign in to comment.