问题标签 [airbrake]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ruby-on-rails - 在 Rails Router 中获取异常内容
因此,我使用错误控制器处理异常,以便在生产中向我的用户显示动态内容。我在我的路由文件中有它要做:
现在唯一的问题是,当我想通知 Airbrake 时,我正在路由错误,例如我在控制器中丢失了信息。如何维护异常信息并将其发送到 500 上的 Airbrake?现在我得到的只是异常发生时发生的环境,这对调试目的帮助不大。
ruby-on-rails - Rails - Logging events with tags or types and getting an email alert - best practices?
Wondering if someone could offer some best practice on logging techniques they use and maybe tagging certain events using airbrake or newrelic or loggly, or something of that nature?
For example, lets say I have events that should never hit my controller in theory, because they are protected on the front end - like a regular user being able to manage an admin. I prevent these controls from being outputted on the front end using ruby if statements. So if my controller gets hit with a request like this, then I know that either that code isn't working right, or someone is doing some hacking with the request being sent.
Either way I want to know. I just found myself writing:
Wondering if anyone can offer some insight as to how they handle it, maybe with a third party logging tool, maybe with some sort of tag that I could set up email alerts with said tool?
ruby-on-rails - 带有空气制动设置的 Ruby on Rails sidekiq
设置 sidekiq 以在 ruby on rails 应用程序上使用 airbrake 的正确步骤是什么。
已经做了:
- 将 gem 'airbrake' 添加到 gemfile
- 将 gem 'airbrake' 添加到 gemfile
- 捆绑安装
- rails generate airbrake --my_api_key
- 创建包含内容的文件 sidekiq.rb:
Sidekiq.configure_server 做 |config| config.error_handlers << Proc.new { |ex,ctx_hash| Airbrake.notify_or_ignore(ex, ctx_hash) } 结束
使其发挥作用的下一步是什么?
ruby-on-rails - 空气制动 / errbit
我已将我的网站从 heroku 迁移到 railhoster.de。现在 errbit/airbrake 不再工作了。变量已设置为与原点相同。
我试过没有协议ERRBIT_HOST=my_errbit_server.herokuapp.com
和它ERRBIT_HOST=http://my_errbit_server.herokuapp.com
。我还尝试添加和删除双引号。但没有任何变化。
这是一个依赖于服务器的问题(配置错误)吗?应用程序被克隆,数据库被转储,设置/配置被复制/粘贴。
真正看起来很奇怪的是,错误消息在不应该出现的地方添加了引号和空格:
这是堆栈跟踪:
javascript - 带有 Airbrake 的 Rails 应用程序 - 401 未经授权
我在我的 ruby on rails 应用程序中成功使用了 airbrake,但有一个例外。
在访问特定视图时,我偶尔会收到 401 未经授权的错误:
POST https://api.airbrake.io/api/v3/projects/0/notices?key= 401 (Unauthorized)
api.airbrake.io/api/v3/projects/0/notices?key=:1
钥匙似乎丢失了,但有时它只是丢失了..
我在我的app.js
文件中设置了我的空气制动凭证,如下所示:
为什么有时这会失败,但有时会在一个特定视图上起作用?
ruby-on-rails - notify_airbrake 在自定义类上引发错误
我们在整个代码库中都使用了 airbrake,除了不从 Rails 层次结构继承的自定义类(即 ActiveRecord)外,它工作得很好。
一些代码:
在空气制动中,我们看到:
作为错误。我想要实际的错误而不是报告错误的错误!
我们的 airbrake.rb 文件:
任何帮助,将不胜感激!
angularjs - 使用 angular 中的 airbrake 报告 $http 错误
我已经将 airbrake 配置为报告错误,但它似乎没有报告 http 错误。因此,我正在尝试将其配置为这样做。这是我的工厂:
然后在配置中:
它似乎只在我得到[object Object]
空气制动错误时起作用,没有额外的错误细节或回溯。还有什么我想念的吗?
ruby-on-rails - 为什么控制器应该使用 notify_airbrake 而不是 Airbrake.notify
在Airbrake wiki中,它说使用notify_airbrake
in controllers 而不是Airbrake.notify
,但没有解释原因。在控制器中使用有什么好处,notify_airbrake
为什么不应该在其他地方使用?
airbrake - 如何在 Airbrake 5 中忽略_user_agent?
我们正在迁移到 Airbrake 5,我想知道如何替换ignore_user_agent
配置的功能。我知道我们必须检查一个add_filter
街区,但不确定检查什么/在哪里检查?
有没有人有替换 Airbrake 5 中的 ignore_user_agent 配置选项的示例?
ruby-on-rails - Rails 空气制动未定义方法
我正在运行我的 rails 应用程序,直到昨天它都运行良好,但是今天当我运行 rails 服务器时,它给了我这个错误。虽然我的 airbrake 也没有任何错误
[airbrake.rb]
configure' from /home/techbirds/icare-master/config/initializers/airbrake.rb:1:in
'来自 /home/techbirds/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:inload' from /home/techbirds/.rvm/gems/ruby-2.2.3/gems/activesupport-4.2.5/lib/active_support/dependencies.rb:268:in
block in load' 来自 /home/techbirds/.rvm/ gems/ruby-2.2.3/gems/activesupport-