sentry在服务器上部署项目时不起作用



我有一个带有哨兵配置的Django项目。当我在本地运行项目时,我可以在哨兵面板中看到错误,但当我在服务器上推送项目并运行它时,我看不到哨兵面板中的错误。这是我的配置代码

import sentry_sdk
from sentry_sdk.integrations.django import DjangoIntegration
from sentry_sdk.integrations.celery import CeleryIntegration
sentry_sdk.init(
dsn="https://********@****.ingest.sentry.io/*****",
integrations=[DjangoIntegration(), CeleryIntegration()],
# Set traces_sample_rate to 1.0 to capture 100%
# of transactions for performance monitoring.
# We recommend adjusting this value in production.
traces_sample_rate=1.0,
# If you wish to associate users to errors (assuming you are using
# django.contrib.auth) you may enable sending PII data.
send_default_pii=True
)

我还对该项目进行了码头化,我对Gunicorn有一个问题,我能够解决,但当我在服务器上运行该项目时,它仍然不起作用。

在某些情况下,人们说设置哨兵参数send_default_pii=False有帮助或debug=True我也有类似的问题,Sentry在uwsgi手动启动时工作,但在Fabric启动过程时不工作。

最新更新