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

feat: Auto enable integrations=true #845

Merged
merged 5 commits into from Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions sentry_sdk/client.py
Expand Up @@ -128,9 +128,9 @@ def _send_sessions(sessions):
self.integrations = setup_integrations(
self.options["integrations"],
with_defaults=self.options["default_integrations"],
with_auto_enabling_integrations=self.options["_experiments"].get(
"auto_enabling_integrations", False
),
with_auto_enabling_integrations=self.options[
"auto_enabling_integrations"
],
)
finally:
_client_init_debug.set(old_debug)
Expand Down
1 change: 1 addition & 0 deletions sentry_sdk/consts.py
Expand Up @@ -64,6 +64,7 @@ def __init__(
ca_certs=None, # type: Optional[str]
propagate_traces=True, # type: bool
traces_sample_rate=0.0, # type: float
auto_enabling_integrations=True, # type: bool
_experiments={}, # type: Experiments # noqa: B006
):
# type: (...) -> None
Expand Down
2 changes: 1 addition & 1 deletion tests/integrations/flask/test_flask.py
Expand Up @@ -45,7 +45,7 @@ def hi():
@pytest.fixture(params=("auto", "manual"))
def integration_enabled_params(request):
if request.param == "auto":
return {"_experiments": {"auto_enabling_integrations": True}}
return {"auto_enabling_integrations": True}
elif request.param == "manual":
return {"integrations": [flask_sentry.FlaskIntegration()]}
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_basics.py
Expand Up @@ -43,7 +43,7 @@ def error_processor(event, exc_info):
def test_auto_enabling_integrations_catches_import_error(sentry_init, caplog):
caplog.set_level(logging.DEBUG)

sentry_init(_experiments={"auto_enabling_integrations": True}, debug=True)
sentry_init(auto_enabling_integrations=True, debug=True)

for import_string in _AUTO_ENABLING_INTEGRATIONS:
assert any(
Expand Down