用Django设置Sentry
我用docker-compose安装了Sentry
我根据这个手册设置了Django https://docs.sentry.io/clients/python/integrations/django/
但是哨兵不会出现错误
我testing了它:
python manage.py raven test
并得到了这个结果:
DEBUG 2017-12-26 08:49:51,033 base 67 140371587118848为主机configurationRaven: 客户端configuration: base_url:http://adyy.ru:9000/sentry 项目:2 public_key:946327fca2844e8684d8233c89826062 secret_key:96fb7bee962c413ba7356434c84985b1 发送testing消息... DEBUG 2017-12-26 08:49:51,305 base 67 140371587118848发送长度为3464的消息到http://adyy.ru:9000/sentry/api/2/store/ 事件ID是“28ca8194b1904081938fc2189cc3b7d2” 错误2017-12-26 08:49:51,325 base 67 140371430176512 Sentry回应错误:HTTP错误403:好(url:http://adyy.ru:9000/sentry/api/2/store/) 回溯(最近一次通话最后): 在send_sync中的文件“/usr/local/lib/python2.7/dist-packages/raven/transport/threaded.py”,第165行 超级(ThreadedHTTPTransport,自我).send(url,数据,标题) 文件“/usr/local/lib/python2.7/dist-packages/raven/transport/http.py”,第43行,发送 ca_certs = self.ca_certs, 文件“/usr/local/lib/python2.7/dist-packages/raven/utils/http.py”,第66行,在urlopen 返回opener.open(url,数据,超时) 打开文件“/usr/lib/python2.7/urllib2.py”,第437行 response = meth(req,response) 在http_response中的文件“/usr/lib/python2.7/urllib2.py”,第550行 'http',请求,响应,代码,味精,hdrs) 文件“/usr/lib/python2.7/urllib2.py”,第475行,错误 返回self._call_chain(* args) 在_call_chain中的文件“/usr/lib/python2.7/urllib2.py”,第409行 result = func(* args) 在http_error_default中的文件“/usr/lib/python2.7/urllib2.py”,第558行 引发HTTPError(req.get_full_url(),code,msg,hdrs,fp) HTTPError:HTTP错误403:确定 错误2017-12-26 08:49:51,326 base 67 140371430176512 [u'This是使用`raven test``'生成的testing消息]
如何使错误进入哨兵?