pub struct TracingConfig {
pub enabled: bool,
pub service_name: String,
pub content_filter: TraceContentFilter,
pub batch: BatchConfig,
}Expand description
Top-level tracing configuration.
Controls whether tracing is enabled, what content is captured, and batch export behaviour.
§Feature gate
This type is only available when the tracing feature is enabled. Tracing
is opt-in, not a default feature, to avoid pulling in OpenTelemetry
dependencies unless explicitly needed.
§Example
use synwire_core::observability::TracingConfig;
let config = TracingConfig::builder()
.enabled(true)
.service_name("my-agent".to_owned())
.build();
assert!(config.enabled);Fields§
§enabled: boolWhether tracing is enabled.
service_name: StringThe service name reported to the tracing backend.
content_filter: TraceContentFilterContent filter for traces.
batch: BatchConfigBatch export configuration.
Implementations§
Source§impl TracingConfig
impl TracingConfig
Trait Implementations§
Source§impl Clone for TracingConfig
impl Clone for TracingConfig
Source§fn clone(&self) -> TracingConfig
fn clone(&self) -> TracingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more