Struct Dial9Config
pub struct Dial9Config(/* private fields */);dial9 only.Expand description
Finalized configuration consumed by the #[main] macro.
Constructed via Dial9Config::builder() followed by either:
Dial9ConfigBuilder::build— strict; returnsResult<Dial9Config, Dial9ConfigBuilderError>. TheRotatingWriteris probed eagerly insidebuild, so any I/O failure surfaces here rather than later when the runtime is built.Dial9ConfigBuilder::build_or_disabled— lenient; never reports a build error, downgrades to a disabled config that preserves the user’swith_tokioconfigurators on validation or I/O failure.
Implementations§
§impl Dial9Config
impl Dial9Config
pub fn from_env() -> Dial9Config
pub fn from_env() -> Dial9Config
Build a production-oriented config from standard DIAL9_* environment variables.
Supported local trace writer variables:
| Variable | Default | Meaning |
|---|---|---|
DIAL9_ENABLED | false | Master switch for installing telemetry. |
DIAL9_TRACE_DIR | /tmp/dial9-traces | Directory for rotated trace segments. |
DIAL9_ROTATION_SECS | 60 | Rotation period in seconds, measured monotonically from writer start. |
DIAL9_MAX_DISK_USAGE_MB | 1024 | Total on-disk trace budget in MiB. |
DIAL9_MAX_FILE_SIZE_MB | min(100, total / 4) | Per-file trace segment size in MiB. |
Supported runtime variables:
| Variable | Default | Meaning |
|---|---|---|
DIAL9_TASK_TRACKING_ENABLED | true | Track tasks spawned through dial9 handles. |
DIAL9_TOKIO_INSTRUMENTATION_ENABLED | true | Install dial9’s Tokio runtime hook instrumentation. |
DIAL9_RUNTIME_NAME | unset | Human-readable runtime name in trace metadata. |
Supported S3 variables (worker-s3 feature required):
| Variable | Default | Meaning |
|---|---|---|
DIAL9_S3_BUCKET | unset | Upload sealed trace segments to this bucket. |
DIAL9_SERVICE_NAME | binary name | Service name used in S3 keys and metadata. |
DIAL9_S3_PREFIX | dial9-traces | S3 object key prefix. |
Supported CPU profiling variables (cpu-profiling feature required):
| Variable | Default | Meaning |
|---|---|---|
DIAL9_CPU_PROFILE_ENABLED | true on Linux with cpu-profiling, false otherwise | Enable CPU stack sampling. |
DIAL9_CPU_SAMPLE_HZ | 99 | CPU sampling frequency in Hz. |
DIAL9_SCHEDULE_PROFILE_ENABLED | true on Linux with cpu-profiling, false otherwise | Enable per-worker scheduler event capture. Requires the CPU profiling setup. |
Supported process resource usage variables:
| Variable | Default | Meaning |
|---|---|---|
DIAL9_PROCESS_RESOURCE_USAGE_ENABLED | true on Unix, false otherwise | Enable process resource usage sampling from getrusage(RUSAGE_SELF). |
DIAL9_PROCESS_RESOURCE_USAGE_SAMPLE_INTERVAL_MS | 100 | Sampling interval in milliseconds. |
Supported task dump variables (capture requires the taskdump feature):
| Variable | Default | Meaning |
|---|---|---|
DIAL9_TASK_DUMP_ENABLED | false | Capture async task dumps at idle yield points. |
DIAL9_TASK_DUMP_IDLE_THRESHOLD_MS | 10 | Mean idle duration for task dump sampling. |
Missing variables use defaults. Blank, invalid, or non-Unicode values
emit a warning and are treated as missing. Some numeric defaults come
from the underlying config builders and are listed here as the current
from_env() behavior. The returned config is built with
Dial9ConfigBuilder::build_or_disabled, so writer setup failures are
logged and downgraded to a plain Tokio runtime.
§impl Dial9Config
impl Dial9Config
pub fn builder() -> Dial9ConfigBuilder
pub fn builder() -> Dial9ConfigBuilder
Start a fluent configuration chain.
When telemetry is enabled (the default), the following setters are
required: base_path and
max_total_size. They may be
omitted if .enabled(false) is set, in which case a plain tokio
runtime is built without telemetry.
max_file_size is optional; when
not set, the underlying RotatingWriter defaults it to
min(100 MiB, max_total_size / 4).
Trait Implementations§
§impl Debug for Dial9Config
impl Debug for Dial9Config
§impl TryFrom<Dial9Config> for TracedRuntime
impl TryFrom<Dial9Config> for TracedRuntime
§type Error = TelemetryRuntimeError
type Error = TelemetryRuntimeError
§fn try_from(
config: Dial9Config,
) -> Result<TracedRuntime, <TracedRuntime as TryFrom<Dial9Config>>::Error>
fn try_from( config: Dial9Config, ) -> Result<TracedRuntime, <TracedRuntime as TryFrom<Dial9Config>>::Error>
Auto Trait Implementations§
impl !RefUnwindSafe for Dial9Config
impl !Sync for Dial9Config
impl !UnwindSafe for Dial9Config
impl Freeze for Dial9Config
impl Send for Dial9Config
impl Unpin for Dial9Config
impl UnsafeUnpin for Dial9Config
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