Sentry SDK - 如何使用新客户端进行 raven 测试调用?

Sentry SDK - How to make raven test call with new client?

在现已弃用的包 raven 中,有一个用于测试设置的 django 管理命令:manage.py raven test

新的SentrySDK does not show how to do it in the django docs也没有任何管理命令。

关于那个话题有什么想法吗?

感谢 GitHub 的 untitaker,我们有了解决方案:

from sentry_sdk import capture_message
capture_message("hi")

你可以打开django shell并执行命令:

python manage.py shell

希望这对其他人也有帮助。