[Laravel]Sentryの導入

https://docs.sentry.io/platforms/php/guides/laravel/

https://docs.sentry.io/platforms/php/guides/laravel/profiling/

  • ローカル環境の.envでDSNの追加方法

When Sentry is installed in your application, it will also be active when you are developing or running tests.
You most likely don’t want errors to be sent to Sentry when you are developing or running tests. To avoid this, set the
DSN
The Data Source Name (DSN) key tells the Sentry SDK where to send events, ensuring they go to the right project.
value tonullto disable sending errors to Sentry.You can also do this by not defining SENTRY_LARAVEL_DSN in your .env or by defining it as SENTRY_LARAVEL_DSN=null.
If you do leave Sentry enabled when developing or running tests, it’s possible for it to have a negative effect on the performance of your application or test suite.
Set traces_sample_rate in config/sentry.php or SENTRY_TRACES_SAMPLE_RATE in your .env to a value greater than 0.0. Setting a value greater than 0.0 will enable Performance Monitoring, null (the default) will disable Performance Monitoring.

ローカル開発環境ではDSNはnullでサンプリングレートは0にすること。


https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/#dsn-utilization

  • DNSの使い方

https://github.com/search?q=ingest.sentry.io&type=code

そのまま.envに追加しているのでsecretsにしなくて良さそう。

Was this helpful?

0 / 0

コメントを残す