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

Remove the ability to configure multiple notifiers #429

Merged
merged 1 commit into from
Feb 21, 2019

Conversation

kyrylo
Copy link
Contributor

@kyrylo kyrylo commented Feb 21, 2019

This feature starts getting in the way of future development of the library:

  • We have to maintain a complex API to support different configurations for many
    notifiers (we have 3 now vs 1 when we were releasing this functionality). We
    want a simple API

  • It's hard to pass the config object around. If a component that sits at the
    bottom layer of the library architecture suddenly needs to read some config
    value, we have to pass it through all the layers, from the top to the
    bottom. This was a compromise since the very beginning but back then it was
    easy to maintain it (although it always bugged me). We now rapidly add new
    features and this approach does not scale well - too much clutter

  • Classes know more than they really need. As a result, testing becomes harder
    since we need to inject the config (sometimes with "correct" values).

An alternative way would be exposing the config through
Airbrake.notifiers[:default][:notice].config.config_value. This only adds to
the clutter since the API becomes more complex and less malleable.

On the other hand, this feature is likely not used by 90% of our customers. We
have a solid Rails workflow that never involves more than 1 notifier.

@kyrylo kyrylo force-pushed the one-notifier-one-config branch from 97f16a2 to cdd2fb4 Compare February 21, 2019 21:03
This feature starts getting in the way of future development of the library:

* We have to maintain a complex API to support different configurations for many
  notifiers (we have 3 now vs 1 when we were releasing this functionality). We
  want a simple API

* It's hard to pass the config object around. If a component that sits at the
  bottom layer of the library architecture suddenly needs to read some config
  value, we have to pass it through all the layers, from the top to the
  bottom. This was a compromise since the very beginning but back then it was
  easy to maintain it (although it always bugged me). We now rapidly add new
  features and this approach does not scale well - too much clutter

* Classes know more than they really need. As a result, testing becomes harder
  since we need to inject the config (sometimes with "correct" values).

An alternative way would be exposing the config through
`Airbrake.notifiers[:default][:notice].config.config_value`. This only adds to
the clutter since the API becomes more complex and less malleable.

On the other hand, this feature is likely not used by 90% of our customers. We
have a solid Rails workflow that never involves more than 1 notifier. If people
need another notifier, they can easily instantiate it directly through
`Airbrake::NoticeNotifier.new`.
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