Overview
Transports:- Send envelopes containing events to Sentry
- Buffer requests to prevent overwhelming the system
- Handle rate limiting from the Sentry backend
- Support graceful shutdown with flushing
Interface Definition
Methods
send
Send an envelope to Sentry.Envelope
required
The envelope containing events to send.
number
HTTP status code of the response.
object
flush
Wait for all pending requests to complete.number
Maximum time in milliseconds to wait. If not provided, waits indefinitely.
true if all requests completed, false if timeout was reached.
Creating a Transport
Use thecreateTransport helper to create a transport:
InternalBaseTransportOptions
required
Transport configuration options.
string
required
The Sentry ingestion endpoint URL.
Record<string, string>
Custom HTTP headers to include in requests.
number
Maximum number of requests to buffer. Defaults to 64.
string
Tunnel URL for proxying requests.
function
required
Callback to record dropped events for client reports.
TransportRequestExecutor
required
Function that executes the actual HTTP request.
PromiseBuffer
Optional custom promise buffer for request queuing.
Transport Request
string | Uint8Array
required
The serialized envelope to send.