pub struct TracingConfig {
pub enabled: bool,
pub level: String,
pub format: String,
pub service_name: String,
pub otlp_endpoint: Option<String>,
pub otlp_export_timeout_secs: u64,
}Expand description
Distributed-tracing and structured-logging configuration.
Fields§
§enabled: boolWhether tracing/logging is active. Default: true.
level: StringLog level filter
format: StringLog format: json, pretty
service_name: StringService name for distributed tracing
otlp_endpoint: Option<String>OTLP exporter endpoint.
When set (e.g. "http://otel-collector:4317"), the server initializes an
OpenTelemetry OTLP exporter and pipes tracing spans to it.
When None, the OTEL_EXPORTER_OTLP_ENDPOINT environment variable is
checked as a fallback. If neither is set, no OTLP export occurs and there
is zero overhead (no gRPC connection attempt).
otlp_export_timeout_secs: u64OTLP exporter timeout in seconds.
Controls how long the OTLP HTTP exporter waits for a response from the
collector before timing out. Defaults to 10 seconds.
Override via [tracing] otlp_export_timeout_secs = 30 in fraiseql.toml.
Trait Implementations§
Source§impl Clone for TracingConfig
impl Clone for TracingConfig
Source§fn clone(&self) -> TracingConfig
fn clone(&self) -> TracingConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TracingConfig
impl Debug for TracingConfig
Source§impl Default for TracingConfig
impl Default for TracingConfig
Source§impl<'de> Deserialize<'de> for TracingConfig
impl<'de> Deserialize<'de> for TracingConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for TracingConfig
impl RefUnwindSafe for TracingConfig
impl Send for TracingConfig
impl Sync for TracingConfig
impl Unpin for TracingConfig
impl UnsafeUnpin for TracingConfig
impl UnwindSafe for TracingConfig
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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