Skip to main content

Forwarder

Struct Forwarder 

Source
pub struct Forwarder {
Show 22 fields pub apikey_validation_interval: i64, pub backoff_base: f64, pub backoff_factor: f64, pub backoff_max: f64, pub connection_reset_interval: u64, pub flush_to_disk_mem_ratio: f64, pub high_prio_buffer_size: usize, pub http_protocol: ForwarderHttpProtocol, pub max_concurrent_requests: usize, pub num_workers: usize, pub outdated_file_in_days: u32, pub recovery_interval: u32, pub recovery_reset: bool, pub retry_queue_capacity_time_interval_sec: u64, pub retry_queue_max_size: ConfigValue<u64>, pub retry_queue_payloads_max_size: ConfigValue<u64>, pub stop_timeout: Duration, pub stop_wait_for_inflight: bool, pub storage_max_disk_ratio: f64, pub storage_max_size_in_bytes: u64, pub storage_path: PathBuf, pub timeout: u64,
}
Expand description

Forwarder retry, backoff, worker, and disk-storage settings.

Fields§

§apikey_validation_interval: i64

How often, in seconds, API keys are checked for validity against the intake.

§backoff_base: f64

Base delay, in seconds, for retry backoff.

§backoff_factor: f64

Multiplier applied to the backoff delay after each failed attempt.

§backoff_max: f64

Maximum retry backoff delay, in seconds.

§connection_reset_interval: u64

How often, in seconds, idle connections are reset.

§flush_to_disk_mem_ratio: f64

Fraction of the in-memory retry queue at which payloads spill to disk.

§high_prio_buffer_size: usize

Capacity of the high-priority send buffer.

§http_protocol: ForwarderHttpProtocol

HTTP protocol the forwarder negotiates with the intake.

§max_concurrent_requests: usize

Maximum number of in-flight requests to the intake.

§num_workers: usize

Number of forwarder worker tasks.

§outdated_file_in_days: u32

Age, in days, after which payloads queued on disk are discarded.

§recovery_interval: u32

Number of retry cycles between attempts to recover a failed endpoint.

§recovery_reset: bool

Whether the recovery interval resets after a successful send.

§retry_queue_capacity_time_interval_sec: u64

Retry-queue capacity expressed as seconds of buffered payloads.

§retry_queue_max_size: ConfigValue<u64>

Maximum number of payloads held in the in-memory retry queue.

Deprecated in favor of retry_queue_payloads_max_size. This setting counts payloads, not bytes; effective_retry_queue_max_size_bytes converts it using MAX_PAYLOAD_SIZE_BYTES. The Datadog schema supplies 0 when nothing sets this key. Because 0 is also a value an operator can set, honor this setting only when it is explicit.

§retry_queue_payloads_max_size: ConfigValue<u64>

Maximum total size, in bytes, of payloads held in the retry queue.

The Datadog schema supplies 15 MiB when nothing sets this key. Takes precedence over retry_queue_max_size when set explicitly.

§stop_timeout: Duration

Grace period the forwarder is given to drain before shutdown.

§stop_wait_for_inflight: bool

Whether the forwarder waits for in-flight requests to finish when it shuts down.

When false, in-flight requests are aborted as soon as shutdown begins and their transactions are requeued with the other pending transactions, which are then persisted to disk if disk storage is enabled. When true, in-flight requests are allowed to finish first, bounded by the topology-wide shutdown timeout; if that timeout elapses first, nothing pending is persisted. The Datadog schema supplies false when nothing sets this key.

§storage_max_disk_ratio: f64

Fraction of available disk the on-disk retry store may use.

§storage_max_size_in_bytes: u64

Maximum size, in bytes, of the on-disk retry store.

§storage_path: PathBuf

Directory where retry payloads are persisted to disk.

§timeout: u64

Per-request timeout, in seconds, for calls to the intake.

Implementations§

Source§

impl Forwarder

Source

pub fn effective_retry_queue_max_size_bytes(&self) -> u64

Returns the effective maximum size, in bytes, of the in-memory retry queue.

An explicit retry_queue_payloads_max_size wins, then an explicit retry_queue_max_size, and otherwise the effective payload-size value, which carries the source schema’s default. Selection cannot look at the values themselves: 0 is both the deprecated setting’s schema default and a value an operator can mean.

The deprecated setting counts payloads rather than bytes, so it is scaled by MAX_PAYLOAD_SIZE_BYTES to reach a byte budget. A count large enough to overflow saturates at u64::MAX, which the retry queue treats as effectively unbounded.

Trait Implementations§

Source§

impl Clone for Forwarder

Source§

fn clone(&self) -> Forwarder

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Forwarder

Source§

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

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

impl Default for Forwarder

Source§

fn default() -> Forwarder

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

impl PartialEq for Forwarder

Source§

fn eq(&self, other: &Forwarder) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Forwarder

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
Source§

impl StructuralPartialEq for Forwarder

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.