【发布时间】:2022-06-29 04:15:17
【问题描述】:
我有一个带有哨兵配置的 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
)
我还对项目进行了 docker 化,我遇到了 Gunicorn 的问题,我能够修复,但是当我在服务器上运行项目时,它仍然无法工作。
【问题讨论】:
标签: django server celery development-environment sentry