Sha256: f2aca000f2d0d8966d70a5288533e0516169a1239d635ca75de79bb381da7beb

Contents?: true

Size: 742 Bytes

Versions: 1

Compression:

Stored size: 742 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.
  config.enabled = false unless config.access_token && Rails.env.production?

  # Enable delayed reporting (using Sidekiq)
  config.use_sidekiq

  # Enable "Person" feature of Rollbar in the context of a "Shop"
  config.person_method = 'current_shop'
  config.person_username_method = 'shopify_domain'

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
disco_app-0.16.0 lib/generators/disco_app/templates/initializers/rollbar.rb