Giter VIP home page Giter VIP logo

raygun4ruby's Introduction

Raygun 4 Ruby Build Status Gem Version

This is the Ruby adapter for the Raygun error reporter, https://raygun.com.

Installation

Add to your application's Gemfile:

$ bundle add raygun4ruby

And then execute:

$ bundle install

Usage

Rails 6+

Step 1

Run:

rails g raygun:install YOUR_API_KEY_HERE

You can find your API key in the Raygun app under "Application Settings".

Step 2

You can then test your Raygun integration by running:

rails raygun:test

You should see an "ItWorksException" appear in your Raygun Crash Reporting dashboard. You're ready to zap those errors! ⚡

Step 3 (optional)

The generator will create a file in config/initializers called "raygun.rb". If you need to do any further configuration or customization of Raygun, that's the place to do it!

By default the Rails integration is set to only report Exceptions in the production environment. To change this behaviour, set config.enable_reporting to something else in config/initializers/raygun.rb.

Version Support

Raygun4Ruby currently supports Rails 6 or later running on Ruby >= 3.0. If you're using an older version of Ruby or Rails please use an older version of Raygun4Ruby

Sinatra

To enable exception tracking in Sinatra, just add configure Raygun and use the Rack middleware in your app:

require 'raygun4ruby'
Raygun.setup do |config|
  config.api_key = "YOUR_API_KEY_HERE"
end
use Raygun::Middleware::RackExceptionInterceptor

Standalone / Manual Exception Tracking

require 'rubygems'
require 'raygun4ruby'

Raygun.setup do |config|
  config.api_key = "YOUR_RAYGUN_API_KEY"
  config.filter_parameters = [ :password, :card_number, :cvv ] # don't forget to filter out sensitive parameters
  config.enable_reporting = Rails.env.production? # true to send errors, false to not log
end

begin
  # your lovely code here
rescue => e
  Raygun.track_exception(e)
end

# You may also pass a user object as the third argument to allow affected customers, like so
begin
  # your lovely code here
rescue => e
  # The second argument is the request environment variables
  Raygun.track_exception(e, {}, user)
end

You can also pass a Hash as the second parameter to track_exception. It should look like a Rack Env Hash

Customizing Parameter Filtering

If you'd like to customize how parameters are filtered, you can pass a Proc to filter_parameters. Raygun4Ruby will yield the params hash to the block, and the return value will be sent along with your error.

Raygun.setup do |config|
  config.api_key = "YOUR_RAYGUN_API_KEY"
  config.filter_parameters do |params|
    params.slice("only", "a", "few", "keys") # note that Hash#slice is in ActiveSupport
  end
end

Recording Breadcrumbs

Breadcrumbs let you provide logging points in your code that will be collected and sent along with any exception sent to Raygun. This lets you have a better understanding of the events that happened in the system that lead up to the exception.

  1. Include it as a module in your class
class SomeClass
  include Raygun::Breadcrumbs

  def some_method
    record_breadcrumb(
      message: "<log message goes here>",
      category: "some category to group them by, maybe authentication or external-apis for example",
      level: :info, # or debug or warning etc, you can configure what level will get sent
      metadata: {custom_data: 'can go here'},
    )
  end
end

This has the added benefit of recording the class the breadcrumb was recorded from automatically

  1. Call the record_breadcrumb method manually
def some_method
  Raygun.record_breadcrumb(
    message: "<log message goes here>",
    category: "some category to group them by, maybe authentication or external-apis for example",
    level: :info, # or debug or warning etc, you can configure what level will get sent
    metadata: {custom_data: 'can go here'},

    # You can also set the class the breadcrumb was logged from
    # It will only be set automatically using the included module approach
    # Method and line number will get added automatically
    class_name: self.class.name
  )
end

If you are using Sinatra or another rack framework you will need to include the Breadcrumbs middleware, this is used for storing the breadcrumbs during a request use Raygun::Middleware::BreadcrumbsStoreInitializer (this must be before you use the Raygun::Middleware::RackExceptionInterceptor)

If you are using a non web based Ruby application you will have to call Raygun::Breadcrumbs::Store.initialize during your applications boot process. The store is per thread, but I have not tested it in a multi threaded application.

Filtering the enire payload using a whitelist

As an alternative to the above, you can also opt-in to the keys/values to be sent to Raygun by providing a specific whitelist of the keys you want to transmit.

This disables the blacklist filtering above (filter_parameters), and is applied to the entire payload (error, request, environment and custom data included), not just the request parameters.

In order to opt-in to this feature, set filter_payload_with_whitelist to true, and specify a shape of what keys you want (the default is below which is to allow everything through, this also means that the query parameters filtered out by default like password, creditcard etc will not be unless changed):

Raygun.setup do |config|
  config.api_key = "YOUR_RAYGUN_API_KEY"
  config.filter_payload_with_whitelist = true

  config.whitelist_payload_shape = {
      machineName: true,
      version: true,
      error: true,
      userCustomData: true,
      tags: true,
      request: {
        hostName: true,
        url: true,
        httpMethod: true,
        iPAddress: true,
        queryString: true,
        headers: true,
        form: {}, # Set to empty hash so that it doesn't just filter out the whole thing, but instead filters out each individual param
        rawData: true
      }
    }
end

Alternatively, provide a Proc to filter the payload using your own logic:

Raygun.setup do |config|
  config.api_key = "YOUR_RAYGUN_API_KEY"
  config.filter_payload_with_whitelist = true

  config.whitelist_payload_shape do |payload|
    # Return the payload mutated into your desired form
    payload
  end
end

Custom User Data

Custom data can be added to track_exception by passing a custom_data key in the second parameter hash.

begin
  # more lovely code
rescue Exception => e
  Raygun.track_exception(e, custom_data: {my: 'custom data', goes: 'here'})
end

Custom data can also be specified globally either by setting config.custom_data to a hash

Raygun.setup do |config|
  config.api_key = "YOUR_RAYGUN_API_KEY"
  config.custom_data = {custom_data: 'goes here'}
end

or to a proc, which gets passed the exception and environment hash

Raygun.setup do |config|
  config.api_key = "YOUR_RAYGUN_API_KEY"
  config.custom_data do |e, env|
    {message: e.message, server: env["SERVER_NAME"]}
  end
end

Ignoring Some Errors

You can ignore certain types of Exception using the ignore option in the setup block, like so:

Raygun.setup do |config|
  config.api_key = "MY_SWEET_API_KEY"
  config.ignore  << ['MyApp::AnExceptionIDontCareAbout']
end

The following exceptions are ignored by default:

ActiveRecord::RecordNotFound
ActionController::RoutingError
ActionController::InvalidAuthenticityToken
ActionDispatch::ParamsParser::ParseError
CGI::Session::CookieStore::TamperedWithCookie
ActionController::UnknownAction
AbstractController::ActionNotFound
Mongoid::Errors::DocumentNotFound

You can see this here and unignore them if needed by doing the following:

Raygun.setup do |config|
  config.api_key = "MY_SWEET_API_KEY"
  config.ignore.delete('ActionController::InvalidAuthenticityToken')
end

Using a Proxy

You can pass proxy settings using the proxy_settings config option.

Raygun.setup do |config|
  config.api_key = "MY_SWEET_API_KEY"
  config.proxy_settings = { address: "localhost", port: 8888 }
end

Affected Customers

Raygun can track how many customers have been affected by an error.

By default, Raygun looks for a method called current_user on your controller, and it will populate the customer's information based on a default method name mapping.

(e.g Raygun will call email to populate the customer's email, and first_name for the customer's first name)

You can inspect and customize this mapping using config.affected_user_mapping, like so:

Raygun.setup do |config|
  config.api_key = "MY_SWEET_API_KEY"
  config.affected_user_method = :my_current_user # `current_user` by default
  # To augment the defaults with your unique methods you can do the following
  config.affected_user_mapping = Raygun::AffectedUser::DEFAULT_MAPPING.merge({
    identifier: :some_custom_unique_identifier,
    # If you set the key to a proc it will be passed the user object and you can construct the value your self
    full_name: ->(user) { "#{user.first_name} #{user.last_name}" }
  })
end

To see the defaults check out affected_user.rb

If you're using Rails, most authentication systems will have this method set and you should be good to go.

The count of unique affected customers will appear on the error group in Raygun Crash Reporting. If your customer has an email attribute, and that email has a Gravatar associated with that address, you will also see your customer's avatar.

If you wish to keep it anonymous, you could set this identifier to something like SecureRandom.uuid and store that in a cookie, like so:

class ApplicationController < ActionController::Base

  def raygun_user
    cookies.permanent[:raygun_user_identifier] ||= SecureRandom.uuid
  end

end

(Remember to set affected_user_method to :raygun_user in your config block...)

Version Tracking

Raygun can attach the version of your application to its error reports. In your Raygun.setup block, set version to the current version of your app.

Raygun.setup do |config|
  config.version = "1.0.0.4" # you could also pull this from ENV or however you want to set it.
end

Tags

Tags can be added to track_exception by passing a tags key in the second parameter hash.

begin
  # more lovely code
rescue Exception => e
  Raygun.track_exception(e, tags: ['my', 'tags', 'go here'])
end

Tags can also be specified globally either by setting config.tags to an array

Raygun.setup do |config|
  config.tags = ['heroku']
end

or to a Proc, which gets passed the exception and environment hash. This proc must return an array of strings

Raygun.setup do |config|
  config.api_key = "YOUR_RAYGUN_API_KEY"
  config.tags do |e, env|
    [env["SERVER_NAME"]]
  end
end

Background Jobs

Resque

Raygun4Ruby also includes a Resque failure backend. You should include it inside your Resque initializer (usually something like config/initializers/load_resque.rb)

require 'resque/failure/multiple'
require 'resque/failure/raygun'
require 'resque/failure/redis'

Resque::Failure::Multiple.classes = [Resque::Failure::Redis, Resque::Failure::Raygun]
Resque::Failure.backend = Resque::Failure::Multiple

Sidekiq

Raygun4Ruby can track errors from Sidekiq (we test on 6+ but there's no reason it shouldn't work on older versions). All you need to do is add the line:

  require 'raygun/sidekiq'

Either in your Raygun initializer or wherever else takes your fancy :simple_smile:

Affected Customers in Sidekiq

To track affected customers, define a class method on your worker class that returns a user object. Make sure the name of this method is the same as whatever you have defined as the affected_user_method in your Raygun configuration and that it returns an object that fits the mappings defined in affected_user_mapping If you have not changed these, refer to Affected customers for the defaults

class FailingWorker
  include Sidekiq::Worker

  def perform(arg1, arg2)
  end

  # Your method must accept an array of arguments
  # These will be the same as those passed to `perform`
  def self.current_user(args)
    arg1 = args[0]
    arg2 = args[1]

    user = User.find_by(name: arg1)

    # Your method must return a user object
    user
  end

Other Configuration options

For a complete list of configuration options see the configuration.rb file

Found a bug?

Oops! Just let us know by opening an Issue on Github.

Contributing

  1. Fork the repo, and install dependencies (bundle install)
  2. Create your feature branch and write your code (git checkout -b my-new-feature)
  3. Write some tests, and make them pass (bundle exec rake)
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create a new Pull Request. Thank you! ✨

Building

  1. Build the gem (gem build raygun4ruby.gemspec) - don't bother trying to build it on Windows, the resulting Gem won't work.
  2. Install the gem (gem install raygun4ruby-VERSION.gem)

raygun4ruby's People

Contributors

bestie avatar cmdrkeen avatar deacon-mcintyre avatar dwnz avatar eoinkelly avatar floppy avatar formigarafa avatar fourseven avatar jamiepenney avatar jjb avatar larskrantz avatar lazyatom avatar lipanski avatar methodmissing avatar mikerogers0 avatar mtparet avatar murtyk avatar nikz avatar ochko avatar paxa avatar searls avatar simi avatar slashek avatar ssaunier avatar sumitramanga avatar toxaq avatar tsmmark avatar ubermouse avatar ushmakapure avatar yamanaltereh 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

Watchers

 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

raygun4ruby's Issues

Deprecation warnings in Rails 5

I started getting a slew of deprecation warnings when running tests after installing raygun4ruby.

Ruby 2.3.1
Rails 5.0.0

DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references.  For example:

  "ActionDispatch::DebugExceptions" => ActionDispatch::DebugExceptions

 (called from <top (required)> at /usr/src/app/config/environment.rb:5)
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references.  For example:

  "Raygun::Middleware::RackExceptionInterceptor" => Raygun::Middleware::RackExceptionInterceptor

 (called from <top (required)> at /usr/src/app/config/environment.rb:5)
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references.  For example:

  "Raygun::Middleware::RailsInsertAffectedUser" => Raygun::Middleware::RailsInsertAffectedUser

 (called from <top (required)> at /usr/src/app/config/environment.rb:5)
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references.  For example:

  "ActionDispatch::DebugExceptions" => ActionDispatch::DebugExceptions

 (called from <top (required)> at /usr/src/app/config/environment.rb:5)
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references.  For example:

  "Raygun::Middleware::RackExceptionInterceptor" => Raygun::Middleware::RackExceptionInterceptor

 (called from <top (required)> at /usr/src/app/config/environment.rb:5)
DEPRECATION WARNING: Passing strings or symbols to the middleware builder is deprecated, please change
them to actual class references.  For example:

  "Raygun::Middleware::RailsInsertAffectedUser" => Raygun::Middleware::RailsInsertAffectedUser

 (called from <top (required)> at /usr/src/app/config/environment.rb:5)

Logs littered with undefined method `pos' for #<Unicorn::TeeInput:0x000000158d8398>

Every some seconds.

https://github.com/MindscapeHQ/raygun4ruby/blob/master/lib/raygun/client.rb#L144

F, [2017-08-28T06:46:33.634868 #2092] FATAL -- : Exception Class: NoMethodError
Exception message: undefined method `pos' for #<Unicorn::TeeInput:0x000000158d8398>

===================================================================
Backtrace:
===================================================================

  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun/client.rb:144:in `raw_data'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun/client.rb:102:in `request_information'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun/client.rb:194:in `build_payload_hash'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun/client.rb:26:in `track_exception'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun.rb:123:in `track_exception_sync'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun.rb:61:in `track_exception'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun.rb:137:in `rescue in track_exception_sync'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun.rb:121:in `track_exception_sync'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun.rb:61:in `track_exception'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun/middleware/rack_exception_interceptor.rb:12:in `rescue in call'
  /home/deploy/apps/vydia/shared/bundle/ruby/2.1.0/gems/raygun4ruby-2.3.0/lib/raygun/middleware/rack_exception_interceptor.rb:10:in `call'

config.relative_url_root

Hey,

In our app we set an relative_url_root like this config.relative_url_root = '/cms' but raygun seems to ignore it.
(in the raygun web gui) erros on: /cms/pages in raygun get an link to /pages.

How can we explain raigun4ruby that we have set relative_url_root and/or what it's value is.

Manny thanks,
Dennis

Breadcrumbs don't work with send_in_background enabled

Because of how the Breadcrumbs are stored (using Thread.current) breadcrumbs are recorded but not sent when send_in_background is enabled. This is because the exceptions are sent on a background thread which is different from the thread the breadcrumbs were recorded on.

Please do a release

Hello, I've finally had a chance to look into affected user tracking, which hasn't been working for us (we're on 1.1.5 of the gem) - I see that you've fixed it in master.

Could you please release (soon) so we don't have to have a github: dependancy in our Gemfile?

Params aren't supported for non-form requests?

I'm trying out raygun for a REST JSON API based platform (web, iOS, and Android clients).

My API's app code handles all errors, reporting to an error service with the following client:

# note: Sidekiq reporting works by requiring 'raygun/sidekiq'
#       in config/initializers/raygun.rb
class RaygunReporter < ErrorReporterClient
  self.instance_eval do
    def configured?
      # creating a client raises if it doesn't have an API key
      Raygun::Client.new rescue false
    end
  end

  def report(exception)
    opts = request.try(:env) || {}
    opts[:custom_data] = context_hash if context_hash.present?
    # Raygun.track_exception(exception, opts={})
    #
    #   Request info is extracted from the 2nd arg, expecting
    #   that it be a superset of ::Rack Environment hash.
    #   If a `:custom_data` key is present, that is extracted
    #   and reported as custom context
    Raygun.track_exception(exception, opts)
  end
end

Upon testing, I noticed that no "Params Values" ever make it through to the error reports.

After further looking at https://github.com/MindscapeHQ/raygun4ruby/blob/master/lib/raygun/client.rb, it appears that we could only expect to get parameter information for requests that have form data media types (https://github.com/MindscapeHQ/raygun4ruby/blob/master/lib/raygun/client.rb#L101).

Is there a way to report parameters in non-form requests, that I'm missing? Is it then intent of the library that there shouldn't be? More info will help me know how to move forward (patch, fork, cry, etc).

Thanks!

Unhelpful error message on missing API key

undefined method `strip' for nil:NilClass
/home/henrik/.gem/gems/httparty-0.11.0/lib/httparty/request.rb:146:in `setup_raw_request'

I would suggest raising a well-named exception.

Support ruby 2.1+ Exception#cause

Ruby Exception has a #cause method since ruby 2.1 that returns the exception that was active at the time the current exception was raised. This makes debugging really nice.

It would be great if Raygun could report the cause chain on versions of ruby that support it.

Rails with Raygun gem but not setup throws own errors, hides app errors.

We've this in an initializer:

if ENV['RAYGUN_APIKEY'].present?
  Raygun.setup do |config|
    config.api_key = ENV['RAYGUN_APIKEY']
    config.filter_parameters = Rails.application.config.filter_parameters
  end
end

When that doesn't run (because RAYGUN_APIKEY isn't there) then all application errors are replaced with Raygun's own error:

2016-04-07T16:18:17.858804+00:00 app[web.1]: Completed 500 Internal Server Error in 26ms
2016-04-07T16:18:17.859709+00:00 app[web.1]: [Raygun] Tracking Exception...
2016-04-07T16:18:17.859737+00:00 app[web.1]: [RAYGUN] Just a note, you've got no API Key configured, which means we can't report exceptions. Specify your Raygun API key using Raygun#setup (find yours at https://app.raygun.io)
2016-04-07T16:18:17.976198+00:00 app[web.1]: 
2016-04-07T16:18:17.976209+00:00 app[web.1]: NoMethodError (undefined method `strip' for nil:NilClass):
2016-04-07T16:18:17.976210+00:00 app[web.1]:   vendor/ruby-2.3.0/lib/ruby/2.3.0/net/http/header.rb:18:in `block in initialize_http_header'
2016-04-07T16:18:17.976211+00:00 app[web.1]:   vendor/ruby-2.3.0/lib/ruby/2.3.0/net/http/header.rb:16:in `each'
2016-04-07T16:18:17.976211+00:00 app[web.1]:   vendor/ruby-2.3.0/lib/ruby/2.3.0/net/http/header.rb:16:in `initialize_http_header'
2016-04-07T16:18:17.976212+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/httparty-0.13.7/lib/httparty/request.rb:176:in `setup_raw_request'
2016-04-07T16:18:17.976213+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/httparty-0.13.7/lib/httparty/request.rb:114:in `perform'
2016-04-07T16:18:17.976214+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/httparty-0.13.7/lib/httparty.rb:545:in `perform_request'
2016-04-07T16:18:17.976215+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/httparty-0.13.7/lib/httparty.rb:492:in `post'
2016-04-07T16:18:17.976215+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.9/lib/raygun/client.rb:163:in `create_entry'
2016-04-07T16:18:17.976216+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.9/lib/raygun/client.rb:27:in `track_exception'
2016-04-07T16:18:17.976217+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.9/lib/raygun.rb:43:in `track_exception'
2016-04-07T16:18:17.976218+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.9/lib/raygun/middleware/rack_exception_interceptor.rb:12:in `rescue in call'
2016-04-07T16:18:17.976218+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.9/lib/raygun/middleware/rack_exception_interceptor.rb:10:in `call'
2016-04-07T16:18:17.976219+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976220+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
2016-04-07T16:18:17.976221+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976222+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
2016-04-07T16:18:17.976222+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976223+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:38:in `call_app'
2016-04-07T16:18:17.976224+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:in `block in call'
2016-04-07T16:18:17.976225+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `block in tagged'
2016-04-07T16:18:17.976225+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:26:in `tagged'
2016-04-07T16:18:17.976226+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `tagged'
2016-04-07T16:18:17.976227+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:in `call'
2016-04-07T16:18:17.976228+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976229+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/request_id.rb:21:in `call'
2016-04-07T16:18:17.976229+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976239+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
2016-04-07T16:18:17.976240+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976241+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
2016-04-07T16:18:17.976241+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976242+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.6/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
2016-04-07T16:18:17.976243+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976243+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/static.rb:120:in `call'
2016-04-07T16:18:17.976244+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976245+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
2016-04-07T16:18:17.976245+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976246+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/ssl.rb:24:in `call'
2016-04-07T16:18:17.976247+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976253+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/engine.rb:518:in `call'
2016-04-07T16:18:17.976253+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/railties-4.2.6/lib/rails/application.rb:165:in `call'
2016-04-07T16:18:17.976254+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.0.314/lib/new_relic/agent/instrumentation/middleware_tracing.rb:96:in `call'
2016-04-07T16:18:17.976255+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/puma-3.1.0/lib/puma/configuration.rb:227:in `call'
2016-04-07T16:18:17.976255+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/puma-3.1.0/lib/puma/server.rb:561:in `handle_request'
2016-04-07T16:18:17.976256+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/puma-3.1.0/lib/puma/server.rb:406:in `process_client'
2016-04-07T16:18:17.976256+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/puma-3.1.0/lib/puma/server.rb:271:in `block in run'
2016-04-07T16:18:17.976257+00:00 app[web.1]:   vendor/bundle/ruby/2.3.0/gems/puma-3.1.0/lib/puma/thread_pool.rb:111:in `block in spawn_thread'

I would expect the behavior of Raygun to be not to intercept, handle, hide, whatever errors until #setup is called. Then, if we set it up wrong, sure, throw errors all over the place. :)

Cannot find code in this repo that corresponds to version 3.0.0 on rubygems

Rubygems has version 3.0.0 of this gem https://rubygems.org/gems/raygun4ruby/versions/3.0.0 but I can't find any reference to that release in this repo. The latest tag I can find is v2.7.0 https://github.com/MindscapeHQ/raygun4ruby/blob/master/lib/raygun/version.rb shows "2.7.1" as the latest version. It's a bit unnerving to not be able to read over the code of a major version bump). I'm assuming somebody forgot a pre-xmas git push 😄

Asynchronous issue reporter?

Hi there! I was wondering if there's any accepted way to configure Raygun to do its logging in an out-of-band process, like an ActiveJob worker. A cursory glance at lib/raygun.rb suggests it wouldn't be too hard to monkey-patch that kind of thing in, but I don't want to reinvent anything that's already on a roll. Thanks in advance for your help!

Raygun::Breadcrumbs::Store error on test enviroment

When running specs, this exception was raised when record_breadcrumb is called.

NoMethodError:
 undefined method `<<' for nil:NilClass

# raygun4ruby-2.4.0/lib/raygun/breadcrumbs/store.rb:43:in `record'
# raygun4ruby-2.4.0/lib/raygun.rb:81:in `record_breadcrumb'

I solved that by explicitly calling Raygun::Breadcrumbs::Store.initialize on my test setup, but maybe is a good idea do it automatically or make it clear in Readme.

Sinatra instructions/clarify non-Rails instructions (and make Rack middleware?)

I noticed Honeybadger have Rack middleware to make Sinatra integration really easy: https://github.com/honeybadger-io/honeybadger-sinatra-example/blob/master/server.rb

And they have that example repo to show how to use it.

Your instructions on non-Rails use don't mention the API token configuration, and having to wrap everything in a block in e.g. a Sinatra app is not ideal. I suggest adding Rack middleware with instructions. Or at least instructions for the current functionality geared specifically to Sinatra apps.

Send errors in staging environments

As I commented in #2, the current defaults mean that silence_reporting is on by default for every environment other than production. While there are no doubt some development workflows where that makes sense, it leads to a false sense of security in cases like ours where we put code through a staging environment first.

I'd suggest you should send errors in every environment that's not development or test. If people have other environments where they want errors suppressed, they can adjust the config themselves.

Allow adding to custom_data programmatically

Probably via config and a (set of) Procs:

Raygun.setup do |config|
  config.api_key = <api-key>
  config.custom_data do |exception, env|  
     { rack_errors: env['rack.errors'] }
  end
end

raygun4ruby will load pry if it is in the gem bundle

https://github.com/MindscapeHQ/raygun4ruby/blob/master/lib/raygun.rb#L9-L12 requires the pry gem if it is available, resucing the LoadError if not. I assume this is a convenience for development so that you can use binding.pry rather than require pry; binding.pry.

A side-effect of requiring pry like this is that it will load the pry gem if it is available in the bundle which is fairly surprising behaviour. I discovered this running derailed_benchmarks. I ran the bundle exec derailed bundle:mem task. A relevant snippet from the README of derailed_benchmarks is:

By default this task will only return results from the :default and "production" groups.

Worked example

If my Gemfile has raygun4ruby loaded in all envs, pry-rails and pry-byebug loaded in development and test envs only i.e. this:

gem 'raygun4ruby'

group :development, :test do
  gem 'pry-byebug'
  gem 'pry-rails'
end

then running bundle exec derailed bundle:mem shows me that Raygun4ruby is requiring pry in production and taking up 12MB e.g.

$ bundle exec derailed bundle:mem
...
  raygun4ruby: 12.3398 MiB
    raygun: 12.3359 MiB
      pry: 11.5625 MiB
        pry/cli: 7.457 MiB
          /Users/eoinkelly/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/pry-byebug-3.6.0/lib/pry-byebug/cli.rb: 7.3555 MiB
            pry-byebug/pry_ext: 6.6836 MiB
              byebug/processors/pry_processor: 6.6758 MiB
                byebug/core: 6.5977 MiB
                  byebug/commands: 4.7461 MiB
                    byebug/commands/irb: 1.9492 MiB (Also required by: /Users/eoinkelly/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/byebug-10.0.2/lib/byebug/settings/autoirb.rb)
                      irb: 1.9258 MiB
                        irb/ruby-lex: 0.957 MiB
                          irb/ruby-token: 0.3906 MiB
                    byebug/commands/break: 0.3047 MiB
                  byebug/context: 0.5 MiB
            pry-byebug/commands: 0.6055 MiB
        pry/commands: 2.0586 MiB
          /Users/eoinkelly/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/pry-0.12.2/lib/pry/commands/ls.rb: 0.3281 MiB
            pry/commands/ls/ls_entity: 0.3008 MiB
        pry/color_printer: 0.3008 MiB
...

If I edit my Gemfile to look like

gem 'raygun4ruby'

group :development, :test do
  # gem 'pry-byebug'
  # gem 'pry-rails'
end

and re-run the benchmark then raygun4ruby is back down to a more civilized 1.7MB

$ bundle exec derailed bundle:mem
...
  raygun4ruby: 1.7383 MiB
    raygun: 1.7383 MiB
      httparty: 1.5391 MiB
        net/http: 0.457 MiB (Also required by: net/https, httparty/net_digest_auth)
        csv: 0.4531 MiB
...

Mitigations

I'm guessing that if bundler is run in production as bundle install --without=development test then this might not happen because the pry gem would not be available.

Conclusion

I think this is a bit of a "trip hazard" for folk. I would guess that pry is in most Gemfiles so unless they know enough to tweak how bundler runs in production, they may unwittingly be losing some RAM to pry in each Rails process.

Unless there is some compelling reason for requiring pry that I'm not aware of I think this gem should not 😄

raygun4ruby crashing server with Graphql requests

Full Backtrace
NoMethodError: undefined method `match' for nil:NilClass
middleware.rb 21 instrument(...)

def instrument(env)
  # Ignore asset requests
  if env['REQUEST_PATH'].match(/^\/assets\//)
      return @app.call(env)
  end
raygun-apm-rails (1.0.57) lib/raygun/apm/rails/middleware.rb:21:in `instrument'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] raygun-apm-rails (1.0.57) lib/raygun/apm/rails/middleware.rb:13:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/rack/agent_hooks.rb:30:in `traced_call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/rack/browser_monitoring.rb:33:in `traced_call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] remotipart (1.4.2) lib/remotipart/middleware.rb:32:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] warden (1.2.8) lib/warden/manager.rb:36:in `block in call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] warden (1.2.8) lib/warden/manager.rb:34:in `catch'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] warden (1.2.8) lib/warden/manager.rb:34:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] rack (2.2.3) lib/rack/etag.rb:27:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] rack (2.2.3) lib/rack/conditional_get.rb:40:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] rack (2.2.3) lib/rack/head.rb:12:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] rack (2.2.3) lib/rack/session/abstract/id.rb:266:in `context'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] rack (2.2.3) lib/rack/session/abstract/id.rb:260:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] actionpack (5.1.7) lib/action_dispatch/middleware/cookies.rb:613:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] actionpack (5.1.7) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] activesupport (5.1.7) lib/active_support/callbacks.rb:97:in `run_callbacks'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] actionpack (5.1.7) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] raygun4ruby (3.2.4) lib/raygun/middleware/rails_insert_affected_user.rb:11:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] raygun4ruby (3.2.4) lib/raygun/middleware/breadcrumbs_store_initializer.rb:12:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] raygun4ruby (3.2.4) lib/raygun/middleware/javascript_exception_tracking.rb:8:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] actionpack (5.1.7) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] actionpack (5.1.7) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] railties (5.1.7) lib/rails/rack/logger.rb:36:in `call_app'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] railties (5.1.7) lib/rails/rack/logger.rb:24:in `block in call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] activesupport (5.1.7) lib/active_support/tagged_logging.rb:69:in `block in tagged'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] activesupport (5.1.7) lib/active_support/tagged_logging.rb:26:in `tagged'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] activesupport (5.1.7) lib/active_support/tagged_logging.rb:69:in `tagged'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] railties (5.1.7) lib/rails/rack/logger.rb:24:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] actionpack (5.1.7) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] request_store (1.4.1) lib/request_store/middleware.rb:19:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] actionpack (5.1.7) lib/action_dispatch/middleware/request_id.rb:25:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] rack (2.2.3) lib/rack/method_override.rb:24:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] rack (2.2.3) lib/rack/runtime.rb:22:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] actionpack (5.1.7) lib/action_dispatch/middleware/executor.rb:12:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] rack (2.2.3) lib/rack/sendfile.rb:110:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] honeybadger (4.7.2) lib/honeybadger/rack/error_notifier.rb:33:in `block in call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] honeybadger (4.7.2) lib/honeybadger/agent.rb:403:in `with_rack_env'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] honeybadger (4.7.2) lib/honeybadger/rack/error_notifier.rb:30:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] honeybadger (4.7.2) lib/honeybadger/rack/user_feedback.rb:31:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] honeybadger (4.7.2) lib/honeybadger/rack/user_informer.rb:21:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] railties (5.1.7) lib/rails/engine.rb:522:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] newrelic_rpm (6.10.0.364) lib/new_relic/agent/instrumentation/middleware_tracing.rb:99:in `call'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] passenger (6.0.5) src/ruby_supportlib/phusion_passenger/rack/thread_handler_extension.rb:107:in `process_request'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] passenger (6.0.5) src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:157:in `accept_and_process_next_request'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] passenger (6.0.5) src/ruby_supportlib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] passenger (6.0.5) src/ruby_supportlib/phusion_passenger/request_handler.rb:415:in `block (3 levels) in start_threads'
[0d3df8f7-9a61-4c2e-aa0e-d7a5be4fd22f] passenger (6.0.5) src/ruby_supportlib/phusion_passenger/utils.rb:113:in `block in create_thread_and_abort_on_exception'
-0.00s

Form values not being sent

Whenever I get a rayray from a POST action, the form values are never included in the error report. Rails 3.2.x.

Raygun::Client breaks on "stack level too deep" exception

Summary: When a SystemStackError: stack level too deep exception is raised by the client application the Raygun::Client fails to parse the stack trace.

Details: In https://github.com/MindscapeHQ/raygun4ruby/blob/master/lib/raygun/client.rb#L43-L51 it assumes that message will be a string, but for SystemStackError: stack level too deep exceptions message is nil. This makes the client throw a new exception (NoMethodError: undefined method 'gsub' for nil:NilClass), not reporting the original exception and masking it with the NoMethodError.

does raygun4ruby have dependency on pry?

I don't see it come up with running bundler, but got this error:

  /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler/resolver.rb:357:in `resolve': Could not find gem 'pry (>= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler/resolver.rb:164:in `start'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler/resolver.rb:129:in `resolve'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler/definition.rb:193:in `resolve'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler/definition.rb:132:in `specs'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler/definition.rb:177:in `specs_for'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler/runtime.rb:13:in `setup'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler.rb:128:in `setup'
from /mnt/task/__gems__/gems/raygun4ruby-1.1.4/lib/raygun.rb:2:in `<top (required)>'

Allow a default array of tags to be set in configuration

We have a project which is deploying to a mix of AWS and Heroku environments. Unfortunately Heroku forces you to use the production env and we already have a "real" production env which is managed by a separate ops team so changing the name isn't feasible.

I am working around this by adding a flag to customData to indicate when exceptions come from the Heroku env but I can't seem to find a way to filter by customData on the Raygun webapp.

I would like to be able to set a default array of tags in the block passed to Raygun.setup so that I can be sure that every exception passed to raygun will get the appropriate tag i.e. I would like to be able to do

Raygun.setup do |config|
  config.api_key = Rails.application.secrets.raygun_api_key
  config.filter_parameters = Rails.application.config.filter_parameters
  config.tags = [ 'from_heroku' ]
end

Currently I can add a custom tag via .track_exception but this does not work for Exceptions that bubble all the way up.

Encoding exceptions are not logged to Raygun

We recently had an encoding bug that resulted in Raygun itself raising an exception. This exception was not logged with our Raygun account, and thus we never found out about it until we happened to be looking through our logs. I was hoping that when Raygun raises an exception while logging our bug, we'd at least get some record of that in our Raygun account.

Here's a snippet of the backtrace from our logs:

2016-12-16T16:15:59Z  Completed 500 Internal Server Error in 54ms (ActiveRecord: 16.2ms | Elasticsearch: 0.0ms)
2016-12-16T16:15:59Z  [Raygun] Tracking Exception...
2016-12-16T16:15:59Z  JSON::GeneratorError (source sequence is illegal/malformed utf-8):
2016-12-16T16:15:59Z    vendor/ruby-2.3.0/lib/ruby/2.3.0/json/common.rb:224:in `generate'
2016-12-16T16:15:59Z    vendor/ruby-2.3.0/lib/ruby/2.3.0/json/common.rb:224:in `generate'
2016-12-16T16:15:59Z    vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.11/lib/raygun/client.rb:167:in `create_entry'
2016-12-16T16:15:59Z    vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.11/lib/raygun/client.rb:27:in `track_exception'
2016-12-16T16:15:59Z    vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.11/lib/raygun.rb:43:in `track_exception'
2016-12-16T16:15:59Z    vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.11/lib/raygun/middleware/rack_exception_interceptor.rb:12:in `rescue in call'
2016-12-16T16:15:59Z    vendor/bundle/ruby/2.3.0/gems/raygun4ruby-1.1.11/lib/raygun/middleware/rack_exception_interceptor.rb:10:in `call'

If it's helpful at all, we fixed the bug in our application with:

def reencode_as_utf8(string)
  string.encode(
    "utf-8",
    "binary",
    invalid: :replace,
    undef: :replace,
    replace: "",
  )
end

Improve documentation for "Raygun.track_exception" calls

Your documentation says to use "Raygun.track_exception(e)", but the problem with that is it swallows the request information that's typically useful to debug the problem.

I recently replaced all of those commands with "Raygun.track_exception(e, defined?(request) ? request.env : {})", and now all my self-called exceptions are much easier to tweak.

My question is what does this mean:

  • Should the raygun4ruby documentation be tweaked to encourage track_exception's 2nd parameter
  • Should raygun4ruby lib be adjusted so track_exception tries to use request.env whenever possible
  • Is something screwed up on my end

Do not block main thread while reporting error

module Raygun
  class Client
    include HTTParty
    include Concurrent::Async

      def create_entry(payload_hash)
        self.class.async.post("/entries", verify_peer: true, verify: true, headers: @headers, body: JSON.generate(payload_hash))
      end

This is pseudo-code, but you get the idea

Version bump?

I was wondering if a v1.1.5 tag could be issued, given how many beneficial PRs have landed since 1.1.4 (namely 39, 43, 44).

Refactor unit tests to reduce test setup duplication

The current unit tests are fairly lengthy, primarily because a lot of them have similar setup that could be shared between them. This could be improved either by potentially moving to a BDD style test suite and making use of before hooks or creating setup methods to create the data.

Local time

To be consistent with the other providers, within the "details" section of the payload, there should be an "environment" section containing a "utcOffset" value which is the number of hours from UTC to the timezone on the end users machine - if possible.

Support Ruby 3 ?

Hello,

we have install this gem on our project which uses ruby ​​3.0.1 but we have zero errors on our interface. Maybe the gem doesn't support this version?

I saw that the .travis.yml does not include ruby ​​3.0.1 for the test

is this possible to add some test on this ruby version ?

Thanks !

Tags persist across track_exception invocations

Hi! I was asked by Samuel Holt from Raygun customer support, in request 22329, to create this ticket.

If I do this:

Raygun.track_exception(StandardError.new("John testing something"), tags: ['test-tag'])
Raygun.track_exception(StandardError.new("John testing something 2"))

It creates two exceptions, both with the test-tag tag.

Let me know if you need any more info!

How to disable javascript?

After upgrading to new version I got error in my tests. How to disable it?

NoMethodError: undefined method `[]' for #<ActionDispatch::Response::RackBody:0x00007f9181c888f8>
    /Users/pavel/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/rack-2.0.6/lib/rack/body_proxy.rb:41:in `method_missing'
    /Users/pavel/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/raygun4ruby-3.1.0/lib/raygun/middleware/javascript_exception_tracking.rb:19:in `inject_javascript_to_response'
    /Users/pavel/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/raygun4ruby-3.1.0/lib/raygun/middleware/javascript_exception_tracking.rb:12:in `call'
    /Users/pavel/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
    /Users/pavel/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/actionpack-5.2.2/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
    /Users/pavel/.rbenv/versions/2.6.0/lib/ruby/gems/2.6.0/gems/railties-5.2.2/lib/rails/rack/logger.rb:38:in `call_app'

And I don't want any javascript injected in my app automatically

raygun.rb syntax error, unexpected tLABEL

Follow the instruction I installed gem successfully, however when I run "rails g raygun:install <API_KEY>", ruby generate syntax errors from raygun.rb (will show errors below). Here is my development environment: ruby 1.9.3-p551, rails 3.1.12, raygun4ruby 2.1.0
The syntax error makes server not able to start absolutely.
Error messages:

/Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:240:in `require': /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/raygun4ruby-2.1.0/lib/raygun.rb:86: syntax error, unexpected tLABEL, expecting ')' (SyntaxError)
        message: nil,
                ^
/Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/raygun4ruby-2.1.0/lib/raygun.rb:86: Can't assign to nil
/Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/raygun4ruby-2.1.0/lib/raygun.rb:90: syntax error, unexpected tLABEL, expecting '='
        metadata: {},
                 ^
/Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/raygun4ruby-2.1.0/lib/raygun.rb:91: Can't assign to nil
/Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/raygun4ruby-2.1.0/lib/raygun.rb:92: Can't assign to nil
/Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/raygun4ruby-2.1.0/lib/raygun.rb:149: syntax error, unexpected keyword_end, expecting $end
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:240:in `block in require'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:223:in `block in load_dependency'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:640:in `new_constants_in'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:223:in `load_dependency'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.1.12/lib/active_support/dependencies.rb:240:in `require'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/raygun4ruby-2.1.0/lib/raygun4ruby.rb:1:in `<top (required)>'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
	from /Users/auser/repo/api/config/application.rb:7:in `<top (required)>'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands.rb:21:in `require'
	from /Users/auser/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.1.12/lib/rails/commands.rb:21:in `<top (required)>'
	from script/rails:6:in `require'
	from script/rails:6:in `<main>'

Runtime exception on send raised in 1.3.3 - apparent conflict involving json_pure

Issue discovered by a customer in production environment when this gem stopped reporting errors.

  1. Typo in lib/raygun.rb line 53: e.backrace.join should be e.backtrace.join
  2. This is preventing the actual reporting of the exception raised by the gem when attempting to send, of which the backtrace is this:
Problem reporting exception to Raygun: IOError: not opened for reading 
/Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:210:in `each'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:210:in `to_a'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:210:in `as_json'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:55:in `block in as_json'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:78:in `check_for_circular_references'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:54:in `as_json'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:245:in `block in as_json'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:245:in `each'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:245:in `map'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:245:in `as_json'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:47:in `block in encode'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:78:in `check_for_circular_references'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:46:in `encode'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:255:in `block in encode_json'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:255:in `each'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:255:in `map'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:255:in `encode_json'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:48:in `block in encode'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:78:in `check_for_circular_references'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:46:in `encode'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/json/encoding.rb:31:in `encode'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/core_ext/object/to_json.rb:20:in `to_json'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/json_pure-1.8.1/lib/json/common.rb:223:in `generate'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/json_pure-1.8.1/lib/json/common.rb:223:in `generate'
 /Users/<user>/.bundler/ruby/1.9.1/raygun4ruby-b19a9fd6f74c/lib/raygun/client.rb:130:in `create_entry'
 /Users/<user>/.bundler/ruby/1.9.1/raygun4ruby-b19a9fd6f74c/lib/raygun/client.rb:25:in `track_exception'
 /Users/<user>/.bundler/ruby/1.9.1/raygun4ruby-b19a9fd6f74c/lib/raygun.rb:49:in `track_exception'
 /Users/<user>/.bundler/ruby/1.9.1/raygun4ruby-b19a9fd6f74c/lib/raygun/middleware/rack_exception_interceptor.rb:12:in `rescue in call'
 /Users/<user>/.bundler/ruby/1.9.1/raygun4ruby-b19a9fd6f74c/lib/raygun/middleware/rack_exception_interceptor.rb:10:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/actionpack-3.1.12/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/railties-3.1.12/lib/rails/rack/logger.rb:13:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/rack-1.3.10/lib/rack/methodoverride.rb:24:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/rack-1.3.10/lib/rack/runtime.rb:17:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/activesupport-3.1.12/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/rack-1.3.10/lib/rack/lock.rb:15:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/actionpack-3.1.12/lib/action_dispatch/middleware/static.rb:61:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/railties-3.1.12/lib/rails/engine.rb:456:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/railties-3.1.12/lib/rails/application.rb:143:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/railties-3.1.12/lib/rails/railtie/configurable.rb:30:in `method_missing'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/newrelic_rpm-3.9.1.236/lib/new_relic/agent/instrumentation/middleware_tracing.rb:57:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/rack-1.3.10/lib/rack/content_length.rb:14:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/railties-3.1.12/lib/rails/rack/log_tailer.rb:14:in `call'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/rack-1.3.10/lib/rack/handler/webrick.rb:59:in `service'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
 /Users/<user>/.rbenv/versions/1.9.3-p484/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

Quick triage indicates this could be the culprit - http://stackoverflow.com/questions/683989/how-do-you-deal-with-the-conflict-between-activesupportjson-and-the-json-gem (awaiting customer's Rails version to confirm)

raygun getting errors looking for a Gemfile...?

I am getting the followng stacktrace when running my ruby program on iron.io....there isn't a persistent Gemfile because it creates the build from the Gemfile when I create the worker....so there is no Gemfile to find. Do we really need to have a Gemfile available for raygun to work?

   /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler/shared_helpers.rb:24:in `default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound)
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler.rb:249:in `default_gemfile'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler.rb:193:in `root'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler.rb:100:in `bundle_path'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler.rb:401:in `configure_gem_home_and_path'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler.rb:91:in `configure'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler.rb:152:in `definition'
from /mnt/task/__gems__/gems/bundler-1.7.4/lib/bundler.rb:117:in `setup'
from /mnt/task/__gems__/gems/raygun4ruby-1.1.4/lib/raygun.rb:2:in `<top (required)>'
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /mnt/task/__gems__/gems/raygun4ruby-1.1.4/lib/raygun4ruby.rb:1:in `<top (required)>'

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.