我怎样才能确保哨兵正在捕获我的异常?
How can I make sure sentry is capturing my exception?
我在一个新的 laravel 项目中实现了 sentry。发送测试异常似乎工作正常:
root@d816d48eed86:/app# php artisan sentry:test
[sentry] Client DSN discovered!
[sentry] Generating test event
[sentry] Sending test event
[sentry] Event sent with ID: d88ff2add86342989da27a8c75ec0562
我还可以看到它已被哨兵网络服务器接收到:
sentry_1 | 10.10.65.1 - - [12/Nov/2019:09:05:12 +0000] "POST /api/35/store/ HTTP/1.0" 200 366 "-" "sentry.php.laravel/1.4.1"
然而,异常从未出现在 sentry 中。
我正在使用 sentry/sentry-laravel
v1.4.1 软件包。
我该如何调试它?
事实证明,启动哨兵容器是不够的。您还必须启动容器 运行 一个 cron 和 worker 容器:
sentry:
image: sentry:9
restart: unless-stopped
environment:
<<: *sentry-config
links:
- postgres
- memcached
- redis
ports:
- "9000"
cron:
image: sentry:9
links:
- redis
- postgres
command: "sentry run cron"
environment:
<<: *sentry-config
worker:
image: sentry
links:
- redis
- postgres
command: "sentry run worker"
environment:
<<: *sentry-config
postgres:
image: postgres:11
restart: unless-stopped
environment:
- POSTGRES_USER=sentry
- POSTGRES_DB=sentry
- POSTGRES_PASSWORD=sentry
redis:
image: redis:5-alpine
restart: unless-stopped
memcached:
image: memcached:1.5-alpine
restart: unless-stopped
我在一个新的 laravel 项目中实现了 sentry。发送测试异常似乎工作正常:
root@d816d48eed86:/app# php artisan sentry:test
[sentry] Client DSN discovered!
[sentry] Generating test event
[sentry] Sending test event
[sentry] Event sent with ID: d88ff2add86342989da27a8c75ec0562
我还可以看到它已被哨兵网络服务器接收到:
sentry_1 | 10.10.65.1 - - [12/Nov/2019:09:05:12 +0000] "POST /api/35/store/ HTTP/1.0" 200 366 "-" "sentry.php.laravel/1.4.1"
然而,异常从未出现在 sentry 中。
我正在使用 sentry/sentry-laravel
v1.4.1 软件包。
我该如何调试它?
事实证明,启动哨兵容器是不够的。您还必须启动容器 运行 一个 cron 和 worker 容器:
sentry:
image: sentry:9
restart: unless-stopped
environment:
<<: *sentry-config
links:
- postgres
- memcached
- redis
ports:
- "9000"
cron:
image: sentry:9
links:
- redis
- postgres
command: "sentry run cron"
environment:
<<: *sentry-config
worker:
image: sentry
links:
- redis
- postgres
command: "sentry run worker"
environment:
<<: *sentry-config
postgres:
image: postgres:11
restart: unless-stopped
environment:
- POSTGRES_USER=sentry
- POSTGRES_DB=sentry
- POSTGRES_PASSWORD=sentry
redis:
image: redis:5-alpine
restart: unless-stopped
memcached:
image: memcached:1.5-alpine
restart: unless-stopped