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

How to replace ignore_user_agent functionality? #9

Closed
jschuman opened this issue Dec 22, 2015 · 3 comments
Closed

How to replace ignore_user_agent functionality? #9

jschuman opened this issue Dec 22, 2015 · 3 comments
Labels

Comments

@jschuman
Copy link

Migrating from 4.3.4 where we used the ignore_user_agent configuration option. I'm trying to figure out how to replicate that functionality using the new add_filter feature. Any guidance?

@kyrylo
Copy link
Contributor

kyrylo commented Dec 22, 2015

Thanks for trying out the new Airbrake gem and bug reports! :)

That would be easy (assuming this fix is merged in and the new gem is published):

Airbrake.add_filter do |notice|
  notice.ignore! if notice[:context][:userAgent].match(/curl/)
end

In the meantime, you can use the class add_filter API.

@jschuman
Copy link
Author

Excellent! Thank you for the prompt reply!

@kyrylo
Copy link
Contributor

kyrylo commented Dec 22, 2015

We've just released airbrake-ruby-1.0.1, so you can use both APIs without restricitons. Happy Airbraking!

@kyrylo kyrylo closed this as completed Dec 22, 2015
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

2 participants