Python 使用 sentry 的问题

2018-11-06 09:37:56 +08:00
 cxa

请问这是什么错误啊,系统 mac,python 客户端。 代码

from raven import Client

client = Client('https://b2e8a12734ae45a5b2ceb0e77040b05c:2752b3c9171c453b9f271d47bfce623f@sentry.log.com/1')

try:
    1 / 0
except ZeroDivisionError:
    client.captureException()

报错内容

Sentry responded with an error: <urlopen error [Errno 54] Connection reset by peer> (url: https://sentry.log.com/api/1/store/)
1686 次点击
所在节点    问与答
5 条回复
kdwycz
2018-11-06 09:51:09 +08:00
raven 版本? 记得新版的 dsn 地址不是这样的
cxa
2018-11-06 10:09:53 +08:00
@kdwycz >>> 你好是 raven.get_version() '6.9.0',
另外我在 docker-compose.yml 也加了 SENTRY_DSN 字段
environment:
SENTRY_MEMCACHED_HOST: memcached
SENTRY_REDIS_HOST: redis
SENTRY_POSTGRES_HOST: postgres
SENTRY_EMAIL_HOST: smtp
SENTRY_SECRET_KEY : '密钥'
SENTRY_DSN : 'dsn 字符串'
kslr
2018-11-06 11:52:53 +08:00
Connection reset by peer
kdwycz
2018-11-06 12:20:37 +08:00
@cxa #2 最新版 raven 和 sentry 的话,检查下 dsn 地址吧,新版的地址短一些
cxa
2018-11-06 13:43:39 +08:00
@kdwycz
页面是这样的
Get started by selecting the platform or language that powers your application.
DSN
https://b2e8a12734ae45a5b2ceb0e77040b05c:2752b3c9171c453b9f271d47bfce623f@sentry.log.com/1
Public DSN
https://b2e8a12734ae45a5b2ceb0e77040b05c@sentry.log.com/1

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/504871

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX