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/configuration/options.mdx
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -205,9 +205,13 @@ Set this boolean to `False` to disable sending of client reports. Client reports
205
205
206
206
List of integrations to enable in addition to [auto-enabling integrations](/platforms/python/integrations). This setting can be used to override the default config options for a specific auto-enabling integration or to add an integration that is not auto-enabled.
207
207
208
+
<ConfigKeyname="disabled-integrations" />
209
+
210
+
List of integrations that will be disabled. This setting can be used to explicitly turn off specific [auto-enabling](/platforms/python/integrations/#available-integrations) or [default](/platforms/python/integrations/default-integrations/) integrations.
211
+
208
212
<ConfigKeyname="auto-enabling-integrations" />
209
213
210
-
Configures whether [auto-enabling integrations](/platforms/python/integrations/default-integrations/) should be enabled. The default is `True`.
214
+
Configures whether [auto-enabling integrations](/platforms/python/integrations/#available-integrations) should be enabled. The default is `True`.
211
215
212
216
When set to `False`, no auto-enabling integrations will be enabled by default, even if the corresponding framework/library is detected.
Copy file name to clipboardExpand all lines: docs/platforms/python/integrations/index.mdx
+21-7Lines changed: 21 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -151,19 +151,33 @@ sentry_sdk.init(
151
151
152
152
### Disabling Integrations
153
153
154
-
There are two types of integrations that are added automatically:
154
+
To disable an integration, use the [`disabled_integrations`](/platforms/python/configuration/options/#disabled-integrations) config option:
155
155
156
+
```python
157
+
import sentry_sdk
158
+
from sentry_sdk.integrations.flask import FlaskIntegration
159
+
160
+
sentry_sdk.init(
161
+
# Do not use the Flask integration even if Flask is installed.
162
+
disabled_integrations=[
163
+
FlaskIntegration(),
164
+
],
165
+
)
166
+
```
167
+
168
+
It's also possible to disable all automatically-added integrations. There are two types:
169
+
170
+
***Auto-enabled integrations** like `FlaskIntegration` are automatically added
171
+
if the SDK detects that you have a corresponding package (like Flask) installed.
172
+
This happens when the [`auto_enabling_integrations`](/platforms/python/configuration/options/#auto-enabling-integrations) option is set to
173
+
`True` (default).
156
174
***Default integrations** like `logging` or `excepthook` are always enabled,
157
175
regardless of what packages you have installed, as long as the
158
176
[`default_integrations`](/platforms/python/configuration/options/#default-integrations) option is `True` (default). They provide essential
159
177
SDK functionality like error deduplication or event flushing at interpreter
160
178
shutdown.
161
-
***Auto-enabling integrations** like `FlaskIntegration` are automatically added
162
-
if the SDK detects you have the corresponding package (like Flask) installed.
163
-
This happens as long as the [`auto_enabling_integrations`](/platforms/python/configuration/options/#auto-enabling-integrations) option is set to
164
-
`True` (default).
165
179
166
-
To disable a specific auto-enabling integration, first disable all auto-enabling integrations by setting the [`auto_enabling_integrations`](/platforms/python/configuration/options/#auto-enabling-integrations) option to `False`. Then, explicitly enable all the auto-enabling integrations you wish to use by setting the [`integrations`](/platforms/python/configuration/options/#integrations) configuration option.
180
+
To disable all auto-enabling integrations, you can use the [`auto_enabling_integrations`](/platforms/python/configuration/options/#auto-enabling-integrations) option:
167
181
168
182
```python
169
183
import sentry_sdk
@@ -178,7 +192,7 @@ sentry_sdk.init(
178
192
)
179
193
```
180
194
181
-
To disable one of the[default integrations](default-integrations/),
195
+
To disable all[default integrations](default-integrations/),
182
196
set [`default_integrations`](/platforms/python/configuration/options/#default-integrations) to `False`. Note that this disables _all_ automatically
183
197
added integrations, both default and auto-enabling. Any integrations you want to use
184
198
then have to be manually specified via the [`integrations`](/platforms/python/configuration/options/#integrations) config option.
0 commit comments