A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.sentry.io/platforms/python/integrations/ below:

Integrations | Sentry for Python

Integrations Sentry provides additional integrations designed to change configuration or add instrumentation to your application.

The Sentry SDK uses integrations to hook into the functionality of popular libraries to automatically instrument your application and give you the best data out of the box.

Available Integrations Web Frameworks Databases AI Data Processing Feature Flags Cloud Computing HTTP Clients GraphQL RPC Logging Miscellaneous Default Integrations Configuration Enabling Integrations

Integrations can be added using the integrations config option.

Integrations marked as "auto-enabled" in the above table will be turned on automatically, unless you set auto_enabling_integrations to False. If you want to configure a specific integration's settings (for instance, change Flask's default transaction_style), add it to your integrations list as you would a non-auto-enabling integration and pass in the desired options.

Copied

import sentry_sdk
from sentry_sdk.integrations.asyncio import AsyncioIntegration
from sentry_sdk.integrations.flask import FlaskIntegration

sentry_sdk.init(
    integrations=[
        
        
        FlaskIntegration(transaction_style="url"),
        
        
        AsyncioIntegration(),
    ],
)
Disabling Integrations

To disable an integration, use the disabled_integrations config option:

Copied

import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration

sentry_sdk.init(
    
    disabled_integrations=[
        FlaskIntegration(),
    ],
)

It's also possible to disable all automatically-added integrations. There are two types:

To disable all auto-enabling integrations, you can use the auto_enabling_integrations option:

Copied

import sentry_sdk
from sentry_sdk.integrations.flask import FlaskIntegration

sentry_sdk.init(
    
    auto_enabling_integrations=False,
    integrations=[
        FlaskIntegration(),
    ],
)

To disable all default integrations, set default_integrations to False. Note that this disables all automatically added integrations, both default and auto-enabling. Any integrations you want to use then have to be manually specified via the integrations config option.

Copied

import sentry_sdk
from sentry_sdk.integrations.atexit import AtexitIntegration
from sentry_sdk.integrations.argv import ArgvIntegration
from sentry_sdk.integrations.dedupe import DedupeIntegration
from sentry_sdk.integrations.excepthook import ExcepthookIntegration
from sentry_sdk.integrations.stdlib import StdlibIntegration
from sentry_sdk.integrations.modules import ModulesIntegration
from sentry_sdk.integrations.threading import ThreadingIntegration

sentry_sdk.init(
    
    default_integrations=False,
    integrations=[
        AtexitIntegration(),
        ArgvIntegration(),
        DedupeIntegration(),
        ExcepthookIntegration(),
        StdlibIntegration(),
        ModulesIntegration(),
        ThreadingIntegration(),
    ],
)
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4