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

airbrake-ruby: don't overwrite notifiers on #configure #464

Merged
merged 1 commit into from
Apr 5, 2019
Merged

Conversation

kyrylo
Copy link
Contributor

@kyrylo kyrylo commented Apr 5, 2019

The reset method introduced in v4.2.2 was resetting Airbrake every time we
call configure. This can result in default filters being lost. E.g. we
add_filter and then configure.

There are two solutions:

  • we add filters within configure
  • we don't call reset when notifiers are already registered

I chose the latter because it's a simpler approach and it does the job. I will
keep in mind the first approach since it sounds more logical to me. Currently,
we decouple "configuration" and filters, however they are the same thing and
adding filters is configuration. That said, this approach has caveats. For
example, I wan't to add some filters in some integration. I don't want to
reconfigure the whole thing, I just want to append my tiny little filter.

@kyrylo kyrylo changed the title airbrake-ruby: don't overwrite notifiers on #reset airbrake-ruby: don't overwrite notifiers on #configure Apr 5, 2019
The `reset` method introduced in v4.2.2 was resetting Airbrake every time we
call `configure`. This can result in default filters being lost. E.g. we
`add_filter` and then `configure`.

There are two solutions:

* we add filters within `configure`
* we don't call reset when notifiers are already registered

I chose the latter because it's a simpler approach and it does the job. I will
keep in mind the first approach since it sounds more logical to me. Currently,
we decouple "configuration" and filters, however they are the same thing and
adding filters *is* configuration. That said, this approach has caveats. For
example, I wan't to add some filters in some integration. I don't want to
reconfigure the whole thing, I just want to append my tiny little filter.
@kyrylo kyrylo merged commit 15a80ea into master Apr 5, 2019
@kyrylo kyrylo deleted the filters-fix branch April 5, 2019 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant