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 ==.