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

Ignoring Items not working #1160

Open
ricardoinneria opened this issue Aug 5, 2024 · 2 comments
Open

Ignoring Items not working #1160

ricardoinneria opened this issue Aug 5, 2024 · 2 comments
Labels

Comments

@ricardoinneria
Copy link

ricardoinneria commented Aug 5, 2024

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

Copy link

linear bot commented Aug 5, 2024

@zdavis-rollbar zdavis-rollbar added the Ruby label Aug 5, 2024 — with Linear
@hovancik
Copy link

Not the same, but I am doing a copy of this comment and it seems to work fine:

#621 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants