Sha256: 186e7707ee994e83a00226c7354ae61065770cd93b2250b31fdaefc8f981bd0f

Contents?: true

Size: 596 Bytes

Versions: 10

Compression:

Stored size: 596 Bytes

Contents

Rollbar.configure do |config|
  # Fetch the access token from the environment.
  config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']

  # Only use Rollbar in production when there's a token configured.
  unless config.access_token and Rails.env.production?
    config.enabled = false
  end

  # Enable delayed reporting (using Sidekiq)
  config.use_sidekiq

  # Add custom handlers.
  config.before_process << proc do |options|
    if options[:exception].is_a?(ActiveResource::ClientError) and options[:exception].message.include?('Too Many Requests')
      raise Rollbar::Ignore
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
disco_app-0.10.0 lib/generators/disco_app/templates/initializers/rollbar.rb
disco_app-0.10.1 lib/generators/disco_app/templates/initializers/rollbar.rb
disco_app-0.10.2 lib/generators/disco_app/templates/initializers/rollbar.rb
disco_app-0.10.3 lib/generators/disco_app/templates/initializers/rollbar.rb
disco_app-0.10.4 lib/generators/disco_app/templates/initializers/rollbar.rb
disco_app-0.10.5 lib/generators/disco_app/templates/initializers/rollbar.rb
disco_app-0.11.0 lib/generators/disco_app/templates/initializers/rollbar.rb
disco_app-0.11.1 lib/generators/disco_app/templates/initializers/rollbar.rb
disco_app-0.12.0 lib/generators/disco_app/templates/initializers/rollbar.rb
disco_app-0.12.1 lib/generators/disco_app/templates/initializers/rollbar.rb