Skip to content

Ignoring Items not working #1160

@ricardoinneria

Description

@ricardoinneria

I am using version 3.5.2 of gem with ruby ​​on rails and configure an initializer in the following way (config/initializers/rollbar.rb).

handler = proc do |options|
  exception = options[:exception]
  message = exception.message.to_s

  raise Rollbar::Ignore if message.include?('.env') ||
                           message.include?('No route matches [POST] "/"') ||
                           message.include?('favicon.ico')
end

Rollbar.configure do |config|
  config.access_token = ENV['ROLLBAR_ACCESS_TOKEN']
  config.enabled = Rails.env.production? || Rails.env.staging?
  config.js_enabled = false
  config.framework = 'Rails'

  config.before_process << handler
end

Expected behavior: You will not be notified of exceptions that contain these messages.

Actual behavior: I continue receiving the notifications.

Also use the option next 'ignored' if ... without success.

Official Documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions