pub struct ObservabilityConfig {
pub otlp_traces_endpoint: Option<String>,
pub otlp_logs_endpoint: Option<String>,
pub service_name: Option<String>,
pub traces_sampling: Option<f64>,
}Expand description
Opt-in observability configuration.
Absent or null disables every observability surface. Covers distributed-tracing today; an OTLP log-appender bridge using the same fields is scoped as a follow-up.
§Examples
use dynomite::conf::ObservabilityConfig;
let cfg = ObservabilityConfig {
otlp_traces_endpoint: Some("http://collector:4317".into()),
otlp_logs_endpoint: None,
service_name: Some("dynomited".into()),
traces_sampling: Some(0.1),
};
assert!(cfg.otlp_traces_endpoint.is_some());Fields§
§otlp_traces_endpoint: Option<String>OTLP gRPC endpoint for distributed traces (e.g.
http://localhost:4317). When None the binary skips
the OTel SDK install entirely; tracing keeps using the
configured tracing-subscriber log layer only.
otlp_logs_endpoint: Option<String>OTLP gRPC endpoint for log records. When set the binary
installs an opentelemetry-appender-tracing bridge
alongside the local log writer. The wiring is scoped as
a follow-up; the field is parsed today so YAML files
authored against the eventual implementation validate.
service_name: Option<String>Service name attached to every emitted span / log record.
Defaults to "dynomited" when unset.
traces_sampling: Option<f64>Trace sampling ratio in [0.0, 1.0]. 1.0 records every
trace, 0.0 records none. Defaults to 1.0 when unset.
Trait Implementations§
Source§impl Clone for ObservabilityConfig
impl Clone for ObservabilityConfig
Source§fn clone(&self) -> ObservabilityConfig
fn clone(&self) -> ObservabilityConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ObservabilityConfig
impl Debug for ObservabilityConfig
Source§impl Default for ObservabilityConfig
impl Default for ObservabilityConfig
Source§fn default() -> ObservabilityConfig
fn default() -> ObservabilityConfig
Source§impl<'de> Deserialize<'de> for ObservabilityConfigwhere
ObservabilityConfig: Default,
impl<'de> Deserialize<'de> for ObservabilityConfigwhere
ObservabilityConfig: Default,
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>,
Source§impl PartialEq for ObservabilityConfig
impl PartialEq for ObservabilityConfig
Source§fn eq(&self, other: &ObservabilityConfig) -> bool
fn eq(&self, other: &ObservabilityConfig) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for ObservabilityConfig
impl Serialize for ObservabilityConfig
impl StructuralPartialEq for ObservabilityConfig
Auto Trait Implementations§
impl Freeze for ObservabilityConfig
impl RefUnwindSafe for ObservabilityConfig
impl Send for ObservabilityConfig
impl Sync for ObservabilityConfig
impl Unpin for ObservabilityConfig
impl UnsafeUnpin for ObservabilityConfig
impl UnwindSafe for ObservabilityConfig
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.