pub struct EmitterConfig {
pub buffer_size: usize,
pub drop_policy: DropPolicy,
pub coalesce_interval_ms: u64,
pub include_trace_id: bool,
pub include_trace_ctx: bool,
}Expand description
Configuration for event emission backpressure and coalescing.
When the frontend cannot consume events as fast as they are produced (e.g., rapid-fire progress updates), this config controls buffering and deduplication behavior.
Fields§
§buffer_size: usizeMaximum number of pending events before the drop policy kicks in. Default: 256.
drop_policy: DropPolicyWhat to do when the buffer is full. Default: DropNewest.
coalesce_interval_ms: u64Minimum interval between events of the same type for the same job. Events arriving faster than this interval are coalesced (only the latest value is kept). Default: 50 ms.
include_trace_id: boolUse include_trace_ctx instead
Whether to include a trace_id field on emitted events (if available).
Default: false (legacy — use include_trace_ctx instead).
Phase status: compatibility / migration-only.
The trace_id is a plain string extracted from job_queue::QueueJob.
The canonical replacement is include_trace_ctx.
When include_trace_ctx is true, trace strings are preserved regardless
of this flag.
Removal condition: removed when all UI consumers migrate to TraceCtx.
include_trace_ctx: boolWhether to propagate canonical trace context on emitted events. Default: true.
When true, the legacy trace_id: Option<String> field is preserved
on events so that downstream consumers can convert it to a
TraceCtx via trace_ctx_from_event_trace_id.
This flag is the canonical replacement for include_trace_id.
When both flags disagree, include_trace_ctx takes precedence:
if include_trace_ctx is true the trace string is kept even when
include_trace_id is false.
Phase status: current / canonical.
Trait Implementations§
Source§impl Clone for EmitterConfig
impl Clone for EmitterConfig
Source§fn clone(&self) -> EmitterConfig
fn clone(&self) -> EmitterConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more