标签: sentry

为什么我会得到记录器“sentry.errors”的缺失处理程序?

django-sentry以集成方式安装。然后我运行python manage.py shell并尝试像这样记录:

>> import logging
>> mylog = logging.getLogger('sentrylogger')
>> mylog.handlers
[<logging.StreamHandler instance at 0x9f6130c>,
 <sentry.client.handlers.SentryHandler instance at 0x9ffed4c>]

>> mylog.debug('this is a test 1')
DEBUG 2011-09-28 11:10:33,178 <ipython console> 4607 -1217300800 this is a test 1
No handlers could be found for logger "sentry.errors"
Run Code Online (Sandbox Code Playgroud)

目前,没有任何内容写入哨兵。我相信丢失的记录器 'sentry.errors' 是我无法登录到哨兵的根本原因。我在正确的轨道上吗?

django sentry

5
推荐指数
1
解决办法
4046
查看次数

如何使用docker设置哨兵

我在dockerhub 找到了官方的哨兵图像.但是文档不完整,我无法一步一步地设置环境.

我们必须首先设置数据库容器,但它们都没有告诉我们如何设置它.具体来说,我不知道哨兵将使用的用户名和密码是什么.

当我运行sentry容器时,我也收到以下错误:

sudo docker run --name some-sentry --link some-mysql:mysql -d sentry
e888fcf2976a9ce90f80b28bb4c822c07f7e0235e3980e2a33ea7ddeb0ff18ce

sudo docker logs some-sentry
Traceback (most recent call last):
  File "/usr/local/bin/sentry", line 9, in <module>
    load_entry_point('sentry==6.4.4', 'console_scripts', 'sentry')()
  File "/usr/local/lib/python2.7/site-packages/sentry/utils/runner.py", line 310, in main
    initializer=initialize_app,
  File "/usr/local/lib/python2.7/site-packages/logan/runner.py", line 167, in run_app
    configure_app(config_path=config_path, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/logan/runner.py", line 89, in configure_app
    raise ValueError("Configuration file does not exist at %r" % (config_path,))
ValueError: Configuration file does not exist at '/.sentry/sentry.conf.py'
Run Code Online (Sandbox Code Playgroud)

sentry docker

5
推荐指数
2
解决办法
6817
查看次数

如何在 Sentry 中自定义用户反馈?

如何在 Sentry 中自定义用户反馈表?

默认情况下,它会说“看起来我们遇到了一些内部问题”。

是否可以更改消息、收集的数据等?

谢谢。

sentry

5
推荐指数
1
解决办法
1593
查看次数

使用Amazon SES进行哨兵配置

网上似乎没有关于此的任何信息...

您如何参数化sendry.conf.py以将Amazon SES后端用于电子邮件?

现在,在Django项目中,我们使用:

EMAIL_BACKEND ='django_ses.SESBackend'EMAIL_USE_SSL = True

AWS_ACCESS_KEY_ID ='密钥'AWS_SECRET_ACCESS_KEY ='秘密'

AWS_SES_REGION_NAME ='eu-west-1'AWS_SES_REGION_ENDPOINT ='email.eu-west-1.amazonaws.com'

岗哨有点不同,有人有见识吗?

非常感谢,

amazon-web-services python-2.7 sentry amazon-ses

5
推荐指数
1
解决办法
771
查看次数

Sentry 的源地图/工件不起作用

我正在使用 webpack 构建、缩小和生成我的应用程序的源映射。工件通过 webpack-sentry-plugin 发送到 sentry.io。

javascript 代码从localhost:8080/js/app.js. 它包含//# sourceMappingURL=app.js.map在最后。Sourcemaps 在 Chrome devtools 上正常工作。

Sentry 的发布/工件包含以下文件:

js/app.js
js/app.js.map
Run Code Online (Sandbox Code Playgroud)

无论如何,当 Sentry 记录错误时,堆栈跟踪来自缩小的文件。它没有使用源映射。

我的设置有什么问题?或者我应该提供哪些其他信息以获得帮助?

sentry webpack

5
推荐指数
1
解决办法
3842
查看次数

无法让 Resque 和 Sentry 一起工作

我有一个使用 Resque 的 Rails 应用程序。我将 Sentry 添加到应用程序中,独立于 Resque,Sentry 似乎工作正常。但是 Sentry 似乎并没有在 Resque 工作中发现错误。

这是我的 Resque 初始化文件:

# used in routes
require 'resque/server'

require 'resque/failure/multiple'
require 'resque/failure/redis'
require 'resque-sentry'

# Change redis settings according to env variable
uri = URI.parse(ENV['REDIS_URL'] || 'redis://localhost:6379')

REDIS_INSTANCE = Redis.new(
  host: uri.host,
  port: uri.port,
  password: uri.password
)

# use a separate namespace
RESQUE_NAMESPACE = "App::#{Rails.env}"

# This will initialize the connection to redis
Resque.redis = REDIS_INSTANCE
Resque.redis.namespace = RESQUE_NAMESPACE

Resque::Failure::Multiple.classes = [Resque::Failure::Redis, Resque::Failure::Sentry]
Resque::Failure.backend = Resque::Failure::Multiple …
Run Code Online (Sandbox Code Playgroud)

ruby-on-rails resque sentry

5
推荐指数
1
解决办法
203
查看次数

使用 sentry-webpack-plugin 上传源地图的问题

我对哨兵 webpack 插件https://github.com/getsentry/sentry-webpack-plugin有问题......我已经阅读了手册并尝试了很多东西,但无法弄清楚出了什么问题......但是,我我使用 webpack 3 ... 每次我收到这个错误

./node_modules/@sentry/cli/sentry-cli 发布新的 1520006165 错误:需要组织 slug(与 --org 一起提供)

但是组织、项目、令牌由包含所有必需数据的 sentry.properties 文件提供给 SentryCliPlugin ... https://docs.sentry.io/clients/java/config/#configuration-via-properties-file

new SentryCliPlugin({
 release: process.env.LAST_BUILD_TIME,
 configFile: process.env.SENTRY_PROPERTIES_FILE,
 include: './app/dist'
})
Run Code Online (Sandbox Code Playgroud)

sentry.properties 文件(添加)

[defaults]
url=https://sentry.io/
org=<YourOrgShortname>
project=<YourProjectShortname>

[auth]
token=<YourToken>
Run Code Online (Sandbox Code Playgroud)

感谢帮助!

编辑

我已经在 github repo 上打开了问题......这是与包相关的问题。 https://github.com/getsentry/sentry-webpack-plugin/issues/34

sentry webpack

5
推荐指数
1
解决办法
2529
查看次数

使用 djangos `manage.py shell` 时禁用 Sentry 报告

我正在使用哨兵报告我的 django 应用程序中发生的错误。

有没有办法在使用类似命令时禁用哨兵错误报告

python manage.py shell

python django sentry

5
推荐指数
1
解决办法
749
查看次数

与哨兵分组

我想用Sentry对异常进行分组,该异常来自不同的服务器,但是我希望所有异常按类型分类在一起,例如,将所有NPE分组。我知道您可以扩展EventBuilderHelper,这就是哨兵分组的方式,但是哨兵java不提供发送带有方法,错误类型等指纹的事件的功能,就像docs.sentry.io中的其他SDK一样

function makeRequest(method, path, options) {
    return fetch(method, path, options).catch(err => {
        Sentry.withScope(scope => {
          // group errors together based on their request and response
          scope.setFingerprint([method, path, err.statusCode]);
          Sentry.captureException(err);
        });
    });
}
Run Code Online (Sandbox Code Playgroud)

这是我尝试做的,但是在这个范围内,没有关于方法,错误等的知识。

package com.test;

import io.sentry.SentryClient;
import io.sentry.event.EventBuilder;
import io.sentry.event.helper.ContextBuilderHelper;

public class FingerprintEventBuilderHelper extends ContextBuilderHelper {

    private static final String EXCEPTION_TYPE = "exception_type";

    public FingerprintEventBuilderHelper(SentryClient sentryClient) {
        super(sentryClient);
    }

    @Override
    public void helpBuildingEvent(EventBuilder eventBuilder) {
        super.helpBuildingEvent(eventBuilder);
        //Get the exception type
        String exceptionType =
        if (exceptionType != null) {
            eventBuilder.withTag(EXCEPTION_TYPE, …
Run Code Online (Sandbox Code Playgroud)

java java-ee sentry

5
推荐指数
1
解决办法
171
查看次数

错误:文件lib.dom.d.ts没有sourceFile

我正在为我的应用程序使用angular(7)cli。我最近将哨兵集成功能添加到了该应用中,并且在构建产品时遇到错误:

    ERROR in ./node_modules/@sentry/utils/esm/is.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
Error: File lib.dom.d.ts does not have a sourceFile.
    at Object.getSourceFile (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/@angular-devkit/build-optimizer/src/helpers/transform-javascript.js:86:23)
    at findSourceFile (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87549:29)
    at /Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87457:85
    at getSourceFileFromReferenceWorker (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87424:34)
    at processSourceFile (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87457:13)
    at processRootFile (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87287:13)
    at /Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87763:21
    at Object.forEach (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:210:30)
    at processLibReferenceDirectives (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87758:16)
    at findSourceFile (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87598:17)
    at /Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87457:85
    at getSourceFileFromReferenceWorker (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87424:34)
    at processSourceFile (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87457:13)
    at processRootFile (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:87287:13)
    at /Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:86300:60
    at Object.forEach (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/typescript/lib/typescript.js:210:30)
[31mERROR in ./node_modules/@sentry/utils/esm/misc.js
Module build failed (from ./node_modules/@angular-devkit/build-optimizer/src/build-optimizer/webpack-loader.js):
Error: File lib.dom.d.ts does not have a sourceFile.
    at Object.getSourceFile (/Users/shurikag/PRIZ/dev/priz-fe/node_modules/@angular-devkit/build-optimizer/src/helpers/transform-javascript.js:86:23) …
Run Code Online (Sandbox Code Playgroud)

sentry webpack angular

5
推荐指数
1
解决办法
234
查看次数