Struct Dial9ConfigBuilder
pub struct Dial9ConfigBuilder<M = PipelineUnset> { /* private fields */ }dial9 only.Expand description
Builder for a Dial9Config with telemetry enabled.
Created via Dial9ConfigBuilder::new. Exposes both tokio and dial9
runtime knobs. Call .build() to produce a Dial9Config.
The M parameter mirrors the inner TracedRuntimeBuilder’s
pipeline-mode marker. It defaults to
PipelineUnset and transitions when
with_runtime returns a builder in a different mode (e.g. after
.with_s3_uploader(...) or .with_custom_pipeline(...)).
Implementations§
§impl Dial9ConfigBuilder
impl Dial9ConfigBuilder
pub fn new(
base_path: impl Into<PathBuf>,
max_file_size: u64,
max_total_size: u64,
) -> Dial9ConfigBuilder
pub fn new( base_path: impl Into<PathBuf>, max_file_size: u64, max_total_size: u64, ) -> Dial9ConfigBuilder
Start a new configuration with the three required writer fields.
base_path— trace file pathmax_file_size— per-file rotation threshold in bytesmax_total_size— total disk budget in bytes
pub fn disabled() -> DisabledDial9ConfigBuilder
pub fn disabled() -> DisabledDial9ConfigBuilder
Create a DisabledDial9ConfigBuilder that builds a plain tokio
runtime with no telemetry. Only .with_tokio() is available.
§impl<M> Dial9ConfigBuilder<M>where
M: Send + 'static,
impl<M> Dial9ConfigBuilder<M>where
M: Send + 'static,
pub fn rotation_period(self, period: Duration) -> Dial9ConfigBuilder<M>
pub fn rotation_period(self, period: Duration) -> Dial9ConfigBuilder<M>
Set the time-based rotation period for the writer.
pub fn with_runtime<F, N>(self, f: F) -> Dial9ConfigBuilder<N>where
F: FnOnce(TracedRuntimeBuilder<HasTracePath, M>) -> TracedRuntimeBuilder<HasTracePath, N>,
N: Send + 'static,
pub fn with_runtime<F, N>(self, f: F) -> Dial9ConfigBuilder<N>where
F: FnOnce(TracedRuntimeBuilder<HasTracePath, M>) -> TracedRuntimeBuilder<HasTracePath, N>,
N: Send + 'static,
Customize the dial9 TracedRuntimeBuilder.
The closure receives the staged builder by value and must return it.
Use this to access runtime configuration methods like
with_runtime_name, with_task_tracking, with_s3_uploader, or
with_custom_pipeline; see TracedRuntimeBuilder for the full list.
Closures may transition the pipeline-mode marker (M) — e.g. calling
.with_s3_uploader(...) returns a builder in
PipelineS3 mode. The transition is
reflected on the returned Dial9ConfigBuilder<N>.
Can be called multiple times; each call composes onto the prior state.
pub fn with_tokio<F>(self, f: F) -> Dial9ConfigBuilder<M>where
F: FnOnce(&mut Builder),
pub fn with_tokio<F>(self, f: F) -> Dial9ConfigBuilder<M>where
F: FnOnce(&mut Builder),
Customize the underlying [tokio::runtime::Builder].
The closure receives the staged builder by mutable reference — use
any tokio knob (worker_threads, thread_name, thread_stack_size,
global_queue_interval, etc.). The builder is pre-seeded with
enable_all() and new_multi_thread(). To switch flavors, replace
the whole builder inside the closure:
*t = tokio::runtime::Builder::new_current_thread(); t.enable_all();.
Can be called multiple times; each call composes onto the prior state.
pub fn build(self) -> Dial9Config
pub fn build(self) -> Dial9Config
Finalize into a Dial9Config ready for the macro.
Trait Implementations§
Auto Trait Implementations§
impl<M = PipelineUnset> !Freeze for Dial9ConfigBuilder<M>
impl<M = PipelineUnset> !RefUnwindSafe for Dial9ConfigBuilder<M>
impl<M = PipelineUnset> !Sync for Dial9ConfigBuilder<M>
impl<M = PipelineUnset> !UnwindSafe for Dial9ConfigBuilder<M>
impl<M> Send for Dial9ConfigBuilder<M>where
M: Send,
impl<M> Unpin for Dial9ConfigBuilder<M>where
M: Unpin,
impl<M> UnsafeUnpin for Dial9ConfigBuilder<M>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more