Transports
Deprecation Warning
A new Python SDK has superseded this deprecated version. Sentry preserves this documentation for customers using the old client. We recommend using the updated Python SDK for new projects.
A transport is the mechanism in which Raven sends the HTTP request to the Sentry server. By default, Raven uses a threaded asynchronous transport, but you can easily adjust this by passing your own transport class.
The transport class is passed via the transport
parameter on Client
:
from raven import Client
Client('...', transport=TransportClass)
Options are passed to transports via the querystring.
All transports should support at least the following options:
timeout = 1
The time to wait for a response from the server, in seconds.
verify_ssl = 1
If the connection is HTTPS, validate the certificate and hostname.
ca_certs = [raven]/data/cacert.pem
A certificate bundle to use when validating SSL connections.
For example, to increase the timeout and to disable SSL verification:
SENTRY_DSN = 'https://examplePublicKey@o0.ingest.sentry.io/0?timeout=5&verify_ssl=0'
Should only be used within an Eventlet IO loop.
from raven.transport.eventlet import EventletHTTPTransport
Client('...', transport=EventletHTTPTransport)
Should only be used within a Gevent IO loop.
from raven.transport.gevent import GeventedHTTPTransport
Client('...', transport=GeventedHTTPTransport)
Requires the requests
library. Synchronous.
from raven.transport.requests import RequestsHTTPTransport
Client('...', transport=RequestsHTTPTransport)
Alternatively, a threaded client also exists for Requests:
from raven.transport.threaded_requests import ThreadedRequestsHTTPTransport
Client('...', transport=ThreadedRequestsHTTPTransport)
A synchronous blocking transport.
from raven.transport.http import HTTPTransport
Client('...', transport=HTTPTransport)
Spawns an async worker for processing messages.
from raven.transport.threaded import ThreadedHTTPTransport
Client('...', transport=ThreadedHTTPTransport)
Should only be used within a Tornado IO loop.
from raven.transport.tornado import TornadoHTTPTransport
Client('...', transport=TornadoHTTPTransport)
Should only be used within a Twisted event loop.
from raven.transport.twisted import TwistedHTTPTransport
Client('...', transport=TwistedHTTPTransport)
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").