Skip to content

Commit 80b18fa

Browse files
authored
feat(django): Add signals_denylist as new option (#9637)
1 parent bf6738e commit 80b18fa

File tree

1 file changed

+13
-1
lines changed
  • docs/platforms/python/integrations/django

1 file changed

+13
-1
lines changed

docs/platforms/python/integrations/django/index.mdx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ By adding `DjangoIntegration` explicitly to your `sentry_sdk.init()` call you ca
8585
<SignInNote />
8686

8787
```python
88+
import django.db.models.signals
89+
8890
import sentry_sdk
8991
from sentry_sdk.integrations.django import DjangoIntegration
9092

@@ -95,7 +97,11 @@ sentry_sdk.init(
9597
DjangoIntegration(
9698
transaction_style='url',
9799
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+
],
99105
cache_spans=False,
100106
),
101107
],
@@ -125,6 +131,12 @@ You can pass the following keyword arguments to `DjangoIntegration()`:
125131

126132
The default is `True`.
127133

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+
128140
- `cache_spans`:
129141

130142
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

Comments
 (0)