You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/python/integrations/django/index.mdx
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,8 @@ By adding `DjangoIntegration` explicitly to your `sentry_sdk.init()` call you ca
85
85
<SignInNote />
86
86
87
87
```python
88
+
import django.db.models.signals
89
+
88
90
import sentry_sdk
89
91
from sentry_sdk.integrations.django import DjangoIntegration
90
92
@@ -95,7 +97,11 @@ sentry_sdk.init(
95
97
DjangoIntegration(
96
98
transaction_style='url',
97
99
middleware_spans=True,
98
-
signals_spans=False,
100
+
signals_spans=True,
101
+
signals_denylist=[
102
+
django.db.models.signals.pre_init,
103
+
django.db.models.signals.post_init,
104
+
],
99
105
cache_spans=False,
100
106
),
101
107
],
@@ -125,6 +131,12 @@ You can pass the following keyword arguments to `DjangoIntegration()`:
125
131
126
132
The default is `True`.
127
133
134
+
-`signals_denylist`:
135
+
136
+
A list of signals to exclude from performance tracking. No spans will be created for these.
137
+
138
+
The default is `[]`.
139
+
128
140
-`cache_spans`:
129
141
130
142
Create spans and track performance of all read operations to configured caches. The spans also include information if the cache access was a hit or a miss. Set to `True` to enable.
0 commit comments