diff --git a/sentry_sdk/integrations/django/__init__.py b/sentry_sdk/integrations/django/__init__.py index 5a808a53cb..41aaecc71a 100644 --- a/sentry_sdk/integrations/django/__init__.py +++ b/sentry_sdk/integrations/django/__init__.py @@ -130,7 +130,7 @@ class DjangoIntegration(Integration): def __init__( self, transaction_style="url", # type: str - middleware_spans=True, # type: bool + middleware_spans=False, # type: bool signals_spans=True, # type: bool cache_spans=False, # type: bool db_transaction_spans=False, # type: bool diff --git a/tests/integrations/django/test_basic.py b/tests/integrations/django/test_basic.py index bbe29c7238..40a6c84810 100644 --- a/tests/integrations/django/test_basic.py +++ b/tests/integrations/django/test_basic.py @@ -1023,7 +1023,7 @@ def test_render_spans_queryset_in_data(sentry_init, client, capture_events): def test_middleware_spans(sentry_init, client, capture_events, render_span_tree): sentry_init( integrations=[ - DjangoIntegration(signals_spans=False), + DjangoIntegration(middleware_spans=True, signals_spans=False), ], traces_sample_rate=1.0, ) @@ -1040,7 +1040,7 @@ def test_middleware_spans(sentry_init, client, capture_events, render_span_tree) def test_middleware_spans_disabled(sentry_init, client, capture_events): sentry_init( integrations=[ - DjangoIntegration(middleware_spans=False, signals_spans=False), + DjangoIntegration(signals_spans=False), ], traces_sample_rate=1.0, )