LoginSignup
1
2

More than 5 years have passed since last update.

Errbit の javascript notifier をまともに動くようにするために

Last updated at Posted at 2013-09-18

2013/09/19時点

for Exception Notifier

memo

notifier.js にはバグあり。とりあえず動くように。
https://github.com/errbit/errbit/blob/master/public/javascripts/notifier.js

  1. printstacktrace部分(49行目 - 491行目)を下記の最新からとってきてアップデート(backtraceを取れるようにする)
    http://cloud.github.com/downloads/eriwen/javascript-stacktrace/stacktrace-0.4.js
    (http://stacktracejs.com/)

  2. 下記を書き換え ※※ <%= airbrake_javascript_notifier %> を使わない場合

792行目

    Config = {
        options: {
            host: '[MY_HOST_SERVER]',

497行目

    var NOTICE_XML = '<?xml version="1.0" encoding="UTF-8"?>' +
        '<notice version="2.0">' +
            '<api-key>[my-api-key]</api-key>' +

※これって設計上の問題では?

  1. notifyのgetリクエストを送る際に、iframeタグを生成しているけれど、エラーが出ることがあるので(Unsafe JavaScript attempt to access frame with URL)imgタグに変更する

889行目

  var request = document.createElement('img');
  1. httpsのssl証明書も気をつけて!

todo

知見が溜まってきたら、そのうちプルリ送る。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2