Limits

Struct Limits 

Source
pub struct Limits {
Show 31 fields pub max_concurrent_requests: usize, pub max_concurrent_queries: usize, pub max_event_size: ByteSize, pub max_attachment_size: ByteSize, pub max_upload_size: ByteSize, pub max_attachments_size: ByteSize, pub max_client_reports_size: ByteSize, pub max_check_in_size: ByteSize, pub max_envelope_size: ByteSize, pub max_session_count: usize, pub max_api_payload_size: ByteSize, pub max_api_file_upload_size: ByteSize, pub max_api_chunk_upload_size: ByteSize, pub max_profile_size: ByteSize, pub max_trace_metric_size: ByteSize, pub max_log_size: ByteSize, pub max_span_size: ByteSize, pub max_container_size: ByteSize, pub max_statsd_size: ByteSize, pub max_metric_buckets_size: ByteSize, pub max_replay_compressed_size: ByteSize, pub max_replay_message_size: ByteSize, pub max_removed_attribute_key_size: ByteSize, pub max_thread_count: usize, pub max_pool_concurrency: usize, pub query_timeout: u64, pub shutdown_timeout: u64, pub keepalive_timeout: u64, pub idle_timeout: Option<u64>, pub max_connections: Option<usize>, pub tcp_listen_backlog: u32, /* private fields */
}
Expand description

Controls various limits

Fields§

§max_concurrent_requests: usize

How many requests can be sent concurrently from Relay to the upstream before Relay starts buffering.

§max_concurrent_queries: usize

How many queries can be sent concurrently from Relay to the upstream before Relay starts buffering.

The concurrency of queries is additionally constrained by max_concurrent_requests.

§max_event_size: ByteSize

The maximum payload size for events.

§max_attachment_size: ByteSize

The maximum size for each attachment.

§max_upload_size: ByteSize

The maximum size for a TUS upload request body.

§max_attachments_size: ByteSize

The maximum combined size for all attachments in an envelope or request.

§max_client_reports_size: ByteSize

The maximum combined size for all client reports in an envelope or request.

§max_check_in_size: ByteSize

The maximum payload size for a monitor check-in.

§max_envelope_size: ByteSize

The maximum payload size for an entire envelopes. Individual limits still apply.

§max_session_count: usize

The maximum number of session items per envelope.

§max_api_payload_size: ByteSize

The maximum payload size for general API requests.

§max_api_file_upload_size: ByteSize

The maximum payload size for file uploads and chunks.

§max_api_chunk_upload_size: ByteSize

The maximum payload size for chunks

§max_profile_size: ByteSize

The maximum payload size for a profile

§max_trace_metric_size: ByteSize

The maximum payload size for a trace metric.

§max_log_size: ByteSize

The maximum payload size for a log.

§max_span_size: ByteSize

The maximum payload size for a span.

§max_container_size: ByteSize

The maximum payload size for an item container.

§max_statsd_size: ByteSize

The maximum payload size for a statsd metric.

§max_metric_buckets_size: ByteSize

The maximum payload size for metric buckets.

§max_replay_compressed_size: ByteSize

The maximum payload size for a compressed replay.

§max_replay_message_size: ByteSize

The maximum size for a replay recording Kafka message.

§max_removed_attribute_key_size: ByteSize

The byte size limit up to which Relay will retain keys of invalid/removed attributes.

This is only relevant for EAP items (spans, logs, …). In principle, we want to record all deletions of attributes, but we have to institute some limit to protect our infrastructure against excessive metadata sizes.

Defaults to 10KiB.

§max_thread_count: usize

The maximum number of threads to spawn for CPU and web work, each.

The total number of threads spawned will roughly be 2 * max_thread_count. Defaults to the number of logical CPU cores on the host.

§max_pool_concurrency: usize

Controls the maximum concurrency of each worker thread.

Increasing the concurrency, can lead to a better utilization of worker threads by increasing the amount of I/O done concurrently. Currently has no effect on defaults to 1.

§query_timeout: u64

The maximum number of seconds a query is allowed to take across retries. Individual requests have lower timeouts. Defaults to 30 seconds.

§shutdown_timeout: u64

The maximum number of seconds to wait for pending envelopes after receiving a shutdown signal.

§keepalive_timeout: u64

Server keep-alive timeout in seconds.

By default, keep-alive is set to 5 seconds.

§idle_timeout: Option<u64>

Server idle timeout in seconds.

The idle timeout limits the amount of time a connection is kept open without activity. Setting this too short may abort connections before Relay is able to send a response.

By default there is no idle timeout.

§max_connections: Option<usize>

Sets the maximum number of concurrent connections.

Upon reaching the limit, the server will stop accepting connections.

By default there is no limit.

§tcp_listen_backlog: u32

The TCP listen backlog.

Configures the TCP listen backlog for the listening socket of Relay. See man listen(2) for a more detailed description of the listen backlog.

Defaults to 1024, a value google has been using for a long time.

Trait Implementations§

Source§

impl Debug for Limits

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Limits

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Limits
where Limits: Default,

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Limits

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Limits

§

impl RefUnwindSafe for Limits

§

impl Send for Limits

§

impl Sync for Limits

§

impl Unpin for Limits

§

impl UnwindSafe for Limits

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T