【问题标题】:sentry Does not work when i deploy project on the server当我在服务器上部署项目时哨兵不起作用
【发布时间】: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


    【解决方案1】:

    在某些情况下,人们说设置哨兵参数send_default_pii=False 有帮助或debug=True

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-13
      • 2021-10-19
      • 1970-01-01
      • 1970-01-01
      • 2013-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多