Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Use string instead of symbol when looking up "failsafe" in payload #951

Commits on Apr 23, 2020

  1. Use string instead of symbol when looking it up in payload

    Unlike ActiveJob, Sidekiq doesn't keep symbols in payloads, and converts them
    to strings. Because of this, the failsafe mechanism was not working as expected
    and it was reported in rollbar#950.
    
    This PR fixes that by looking up 'failsafe' in the payload instead of :failsafe
    
    An example of what the payload looks like when logged in our logs from Rollbar:
    
    ```
    ERROR -- : [Rollbar] Error processing the item: Net::ReadTimeout, Net::ReadTimeout with #<TCPSocket:(closed)>. Item: {"access_token"=>"abcdefghijklmnop", "data"=>{"level"=>"error", "environment"=>"development", "body"=>{"message"=>{"body"=>"Failsafe from rollbar-gem. Net::ReadTimeout: \"Net::ReadTimeout with #<TCPSocket:(closed)>\" in /usr/local/lib/ruby/2.6.0/net/protocol.rb:217:in `rbuf_fill': error in process_item"}}, "notifier"=>{"name"=>"rollbar-gem", "version"=>"2.24.0"}, "custom"=>{"orig_uuid"=>nil, "orig_host"=>nil}, "internal"=>true, "failsafe"=>true}}
    ```
    mauro-oto committed Apr 23, 2020
    Configuration menu
    Copy the full SHA
    101305b View commit details
    Browse the repository at this point in the history