sentry

Sentry django configuration - logger

夙愿已清 提交于 2019-12-10 13:59:36
问题 I am trying to use simple logging and want to send errors/exceptions to Sentry. I configured the Sentry as per the document and run the test successfully on my dev( python manage.py raven test ) I added the Logging configuration as in Sentry documentation to a Django settings When I put this code in my View, then it doesn't work at all import logging logger = logging.getLogger(__name__) logger.error('There was an error, with a stacktrace!', extra={ 'stack': True, }) Maybe I am missing

Convert JSON (from Sentry) to HTML with TypeScript

爱⌒轻易说出口 提交于 2019-12-10 13:47:28
问题 I want to learn TypeScript. I have a JSON dictionary returned by the sentry method event_from_exception() (Python). I would like to format it as nice HTML with expandable local variables and pre_ and post_context. The result should look roughly like this: Here is an example json: { "exception": { "values": [ { "stacktrace": { "frames": [ { "function": "main", "abs_path": "/home/modlink_cok_d/src/sentry-json.py", "pre_context": [ "from sentry_sdk.utils import event_from_exception", "", "def

Sentry前端部署拓展篇(sourcemap关联、issue关联、release控制) javascript html5 阅读约 7 分钟 原文首发于我的个人博客: https://lonhon.

删除回忆录丶 提交于 2019-12-09 14:43:22
原文首发于我的个人博客: https://lonhon.top/ 之前的 《基础篇》 主要介绍了Sentry和基本部署流程,在实际使用过程中你会发现Sentry受欢迎的原因:除了单纯的监控异常还有溯源、分发任务等一条龙服务。本篇文章主要讲述Sentry中较好的拓展功能,包括: Release控制,分别处理线上、测试环境的异常 通过SourceMap直接查看出错js源码 报警邮件发送规则 Issue关联GITHUB/GITLAB 上篇文章已将Sentry的各种文档、社区贴出,本文更多是操作性的东西,代码、图片较多。 准备工作 需要安装Sentry对应的命令行管理工具 sentry-cli,方式如下: npm i -g @sentry/cli 安装完成后可通过 sentry-cli -V 查看版本。 生成token 点击Sentry页面左下角头像,选择API后就可以生成token,记得勾选 project:write 权限。 登录 $ sentry-cli --url https://myserver/ login 回车后输入上一步获得的 token 即可,如果用的Sentry的SaaS可以不指定 url Release控制 在开发过程中我们希望不监控本地环境下的异常,测试环境的和生产环境的异常分离,所以就需要Release来进行“异常”的版本控制。 创建Release sentry

What's a good setup for React Native crash reporting? [closed]

心不动则不痛 提交于 2019-12-08 22:09:36
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I'm seeing that getSentry has crash reporting for React Native now: https://docs.getsentry.com/hosted/clients/javascript/integrations/react-native/ I like them because they do a good job correlating exceptions with your source maps. But I also want to catch native crashes. Do you

Uglify with SourceMaps while using grunt usemin and rev

我怕爱的太早我们不能终老 提交于 2019-12-08 17:36:21
问题 I want to log javascript errors to server but the stacktrace is not useful with minified JS code. So I was thinking of using either Getsentry or Rollbar which shows proper stack trace with the help of sourcemaps . But I'm struggling to create sourcemap in first place. I'm getting this error "Destination (_build/js/app.js) not written because src files were empty." Once it creates source map properly, there will be another problem i.e. rev will rename the file. I also need to leave the

How to ignore a logger in the Sentry Python SDK

孤人 提交于 2019-12-08 17:14:38
问题 I'm using sentry-python SDK for capture exceptions from my django server. I don't want to capture django.security.DisallowedHost like above. How to remove sentry handling for that logger? I attached my server configuration below. settings.py LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'null': { 'level': 'DEBUG', 'class': 'logging.NullHandler', }, }, 'loggers': { # Silence SuspiciousOperation.DisallowedHost exception ('Invalid # HTTP_HOST' header messages). Set

TypeError - null is not an object (evaluating 't.data') [React Native 0.59.5 Android]

浪尽此生 提交于 2019-12-08 10:54:02
问题 After updating my React Native application to 0.59.5, I am seeing several people are crashing in random places for Android users (iOS users are fine). I am using Sentry to track the crash places and the error says: TypeError readAsText(react-native/Libraries/Blob/FileReader) Following is the stack reported in Sentry dashboard. When I check BREADCRUMBS, I see the following. I am using fetch for HTTP calls. Has anyone faced this problem before? Our API is returning fine. The issue is happening

安装sentry的几个命令

一笑奈何 提交于 2019-12-08 10:36:30
docker run -d --name sentry-redis redis docker run -d --name sentry-postgres -e POSTGRES_PASSWORD=secret -e POSTGRES_USER=sentry postgres docker run --rm sentry config generate-secret-key docker run -it --rm -e SENTRY_SECRET_KEY="_sb(3*9nt@eree@ssj_pdwx9(-9&ly7vq0rt4u(ct1nwi5f(!#" --link sentry-postgres:postgres --link sentry-redis:redis sentry upgrade docker run -d --name my-sentry -e SENTRY_SECRET_KEY="_sb(3*9nt@eree@ssj_pdwx9(-9&ly7vq0rt4u(ct1nwi5f(!#" --link sentry-redis:redis --link sentry-postgres:postgres -p 9000:9000 sentry docker run -d --name sentry-cron -e SENTRY_SECRET_KEY="_sb(3

CentOS6.8搭建Sentry环境

拟墨画扇 提交于 2019-12-07 21:19:15
安装第三方依赖包(redis依赖包,python依赖包,pip依赖包等必须提前安装): yum install -y zlib zlib-devel yum install -y cpp binutils glibc-kernheaders glibc-common glibc-devel gcc gcc-c++ make wget libstdc++-devel tcl tcl-devel yum install -y openssl openssl-devel yum install postgresql-devel* 下载Python2.7.14 : 下载2.7.*版本 3.*版本在使用pip安装sentry时会出现python库与sentry依赖库兼容性问题 , 2.6.*版本太低,对sentry不能有很好的支持 下载地址:https://www.python.org/downloads/ 下载sentry2.7中推荐版本 并上传服务器,并解压、配置、编译、安装: [root@centos1 py]# tar -xzvf Python-2.7.14.tgz [root@centos1 py]# cd Python-2.7.14 [root@centos1 Python-2.7.14]# ./configure --prefix=/usr/local/python2.7/

C++: strange behavior with std::istream or sentry wrap around

自古美人都是妖i 提交于 2019-12-07 14:06:12
问题 This small custom getline function was given as an answer to a question about handling different line endings. The function worked great until it was edited 2 days ago to make it not skip leading white spaces for each line. However, after the edit, the program now goes into an infinite loop. The only change done to the code was this following line which was changed from this: std::istream::sentry se(is); // When this line is enabled, the program executes // correctly (no infinite loop) but it