pub struct ObservabilityConfig {
pub log_level: String,
pub msg_length: Option<usize>,
pub buffered_lines_limit: Option<usize>,
pub trace_level: String,
pub service_name: String,
pub component_name: String,
pub version: String,
pub traces_endpoint: Option<String>,
pub headers_filter: Option<HeadersFilter>,
}Expand description
configuration for logs and traces
Fields§
§log_level: Stringlog level read to string and later parsed into EnvFilter
msg_length: Option<usize>Maximum message field length, if set: message field will be cut if len() exceed this limit
buffered_lines_limit: Option<usize>Sets limit for tracing_appender::non_blocking::NonBlocking
trace_level: Stringtrace level read to string and later parsed into EnvFilter
service_name: Stringservice name to be used in logs
component_name: Stringcomponent name to be used in logs and traces
version: Stringcomponent version
traces_endpoint: Option<String>configures tracing_opentelemetry::layer endpoint for sending traces.
headers_filter: Option<HeadersFilter>initialize crate::observability::HEADERS_FILTER static variable in crate::bootstrap() or crate::observability::init_tracing() fn.
Trait Implementations§
Source§impl Clone for ObservabilityConfig
impl Clone for ObservabilityConfig
Source§fn clone(&self) -> ObservabilityConfig
fn clone(&self) -> ObservabilityConfig
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 ObservabilityConfig
impl Debug for ObservabilityConfig
Source§impl Default for ObservabilityConfig
impl Default for ObservabilityConfig
Source§fn default() -> ObservabilityConfig
fn default() -> ObservabilityConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ObservabilityConfig
impl<'de> Deserialize<'de> for ObservabilityConfig
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 ObservabilityConfig
impl RefUnwindSafe for ObservabilityConfig
impl Send for ObservabilityConfig
impl Sync for ObservabilityConfig
impl Unpin 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
Mutably borrows from an owned value. Read more
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request