Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugsnag 6.x #2

Merged
merged 4 commits into from
Jan 24, 2018
Merged

Bugsnag 6.x #2

merged 4 commits into from
Jan 24, 2018

Conversation

koshigoe
Copy link
Contributor

@koshigoe koshigoe commented Jan 24, 2018

Why

Bugsnag 6.x での breaking changes に対応できていないため、Bugsnag 5.x から 6.x にアップデートする事ができない状況。

How

  • Bugsnag::Delivery::Fluent.deliver に第四引数を追加
  • Bugsnag.warn の様なロギングメソッドは Bugsnag::Configuration のものを使う

Check

  • CI
  • 簡易動作確認

@koshigoe koshigoe added the bug label Jan 24, 2018
@koshigoe koshigoe self-assigned this Jan 24, 2018
@koshigoe koshigoe changed the title Bugsnag 6.x にアップデートできる様に deliver のシグネチャを修正 Bugsnag 6.x Jan 24, 2018
@koshigoe
Copy link
Contributor Author

koshigoe commented Jan 24, 2018

動作確認

# test.rb
require 'bundler/setup'
require 'bugsnag/delivery/fluent'

# td-agenet は localhost:24224 で稼働中。
# API キーは環境変数 BUGSNAG_API_KEY で設定済み。
Bugsnag.configure do |config|
  config.delivery_method = :fluent
end
# deliver メソッドの
Bugsnag.notify(StandardError.new('TEST'))
$ bundle exec ruby test.rb
** [Bugsnag] 2018-01-24 17:00:25 +0900: Notifying https://notify.bugsnag.com of StandardError

Bugsnag に記録される事まで確認。

@koshigoe koshigoe merged commit 8dd802b into master Jan 24, 2018
@koshigoe koshigoe deleted the feature/bugsnag-6.x branch January 24, 2018 08:16
@koshigoe
Copy link
Contributor Author

@koshigoe
Copy link
Contributor Author

6.6.3 より前の Bugsnag だと、ペイロードに apiKey がセットされないため、bugsnag-delivery-fluent を使って Fluentd 経由で Bugsnag に送信するさいに認証が通らずエラーレポートを記録出来ない。
bugsnag/bugsnag-ruby#418

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant