Skip to content

Commit

Permalink
feat: Auto enable integrations=true (#845)
Browse files Browse the repository at this point in the history
* feat: Auto enable integrations=true

* fix: Formatting

* ref: Remove experiments flag

* fix: Formatting

Co-authored-by: sentry-bot <markus+ghbot@sentry.io>
  • Loading branch information
HazAT and sentry-bot committed Oct 13, 2020
1 parent a7f7e2a commit 356ad6c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
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

0 comments on commit 356ad6c

Please sign in to comment.