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

Added configuration option to disable autoconfiguration #419

Merged
merged 6 commits into from
Mar 13, 2018

Conversation

Cawllec
Copy link
Contributor

@Cawllec Cawllec commented Jan 24, 2018

This adds two functions, load_integrations & load_integration(integration) that allow Bugsnag integrations to be loaded during runtime.

By default, load_integrations will be run when the bugsnag module is required. This behaviour can be disabled using the environment variable BUGSNAG_DISABLE_AUTOCONFIGURE.

Tentatively fixes #391, #403

@snmaynard
Copy link
Contributor

What manual testing has been done?

@Cawllec
Copy link
Contributor Author

Cawllec commented Jan 24, 2018

I've tested it in rails to ensure the environment variable stops it from loading the railtie, which works correctly. I guess the main issue would be that it still loads in bugsnag\integrations\rack regardless of environment variables as it's always done that separately to the other integrations.

Edit: Meant bugsnag\integrations\rack, not rake.

@snmaynard
Copy link
Contributor

We should test it for all the integrations to ensure that manually loading the sidekiq integration (as an example) works and we dont need to make any changes to support the later loading.

@Cawllec
Copy link
Contributor Author

Cawllec commented Jan 29, 2018

Now tested and confirmed to work with:

  • Sidekiq
  • Rails
  • Resque
  • Rake

Does not work with:

  • Rack

@kattrali
Copy link
Contributor

Rack or rake? Checking because rake was mentioned in #419 (comment)

@Cawllec
Copy link
Contributor Author

Cawllec commented Jan 29, 2018

Rack. We loaded the Rack integration outside of the load_integrations loop previously, probably means removing it from there would make this a breaking change.

@kattrali
Copy link
Contributor

What broke when moving the import to the load_integrations loop?

@Cawllec
Copy link
Contributor Author

Cawllec commented Jan 29, 2018

Nothing I suppose. I haven't added it to the loop yet (as it was separate anyway), but it shouldn't change the expected behaviour if I do. I'll do that and test it.

@Cawllec
Copy link
Contributor Author

Cawllec commented Feb 1, 2018

Everything works as expected with rack, and there's no magic conf happening.

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.

Difficulty configuring Bugsnag in Rails before it configures itself
3 participants