Skip to content

Commit 4d80670

Browse files
authored
This disables Django Cache spans by default. (#2120)
* Made Django Cache spans disabled by default
1 parent 8672640 commit 4d80670

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sentry_sdk/integrations/django/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def __init__(
103103
transaction_style="url",
104104
middleware_spans=True,
105105
signals_spans=True,
106-
cache_spans=True,
106+
cache_spans=False,
107107
):
108108
# type: (str, bool, bool, bool) -> None
109109
if transaction_style not in TRANSACTION_STYLE_VALUES:

tests/integrations/django/test_basic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1017,8 +1017,6 @@ def test_cache_spans_middleware(
10171017
use_django_caching_with_middlewares,
10181018
settings,
10191019
):
1020-
client.application.load_middleware()
1021-
10221020
sentry_init(
10231021
integrations=[
10241022
DjangoIntegration(
@@ -1029,6 +1027,8 @@ def test_cache_spans_middleware(
10291027
],
10301028
traces_sample_rate=1.0,
10311029
)
1030+
1031+
client.application.load_middleware()
10321032
events = capture_events()
10331033

10341034
client.get(reverse("not_cached_view"))

0 commit comments

Comments
 (0)