Skip to content

Commit

Permalink
This disables Django Cache spans by default. (#2120)
Browse files Browse the repository at this point in the history
* Made Django Cache spans disabled by default
  • Loading branch information
antonpirker authored and sentrivana committed May 19, 2023
1 parent 8480e47 commit 2ce955a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sentry_sdk/integrations/django/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def __init__(
transaction_style="url",
middleware_spans=True,
signals_spans=True,
cache_spans=True,
cache_spans=False,
):
# type: (str, bool, bool, bool) -> None
if transaction_style not in TRANSACTION_STYLE_VALUES:
Expand Down
4 changes: 2 additions & 2 deletions tests/integrations/django/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,6 @@ def test_cache_spans_middleware(
use_django_caching_with_middlewares,
settings,
):
client.application.load_middleware()

sentry_init(
integrations=[
DjangoIntegration(
Expand All @@ -1029,6 +1027,8 @@ def test_cache_spans_middleware(
],
traces_sample_rate=1.0,
)

client.application.load_middleware()
events = capture_events()

client.get(reverse("not_cached_view"))
Expand Down

0 comments on commit 2ce955a

Please sign in to comment.