import sentry_sdk

sentry_sdk.init(
    dsn=sentry_dsn,
    http_proxy='http://proxy.example:8080',
    https_proxy='http://proxy.example:8080',
)

Keep sentry_dsn as the Sentry project destination. These sentry-sdk options select the intermediary for the built-in HTTP transport.

Desired policyConfiguration consequence
Use an explicit proxySupply the proxy options at initialization, as shown; the HTTP proxy list can supply candidates for a public HTTP route.
Use environment settingsOmit explicit values. For an HTTPS DSN, the transport tries the HTTPS proxy path first and can fall back to HTTP.
Disable environment-derived pathsSet both explicit proxy options to empty strings. Clearing only HTTPS can leave HTTP fallback.

Raven's ThreadedRequestsHTTPTransport belongs to the older raven-python package; it is not this initialization interface.

Then evaluate delivery at the transport stage. The standard HTTP transport normally queues work on a background worker, so successful initialization or an event identifier does not show the envelope reached the proxy. Use the supported flush or shutdown lifecycle in a short-lived application, retaining transport errors without exposing secrets.

Аффингæй хæстæг статьялтæ