pub struct TracingSetup {
pub(crate) base_level: Option<String>,
pub(crate) extra_directives: Option<String>,
pub(crate) tokio_console_bind: Option<SocketAddr>,
pub(crate) with_jaeger: bool,
pub(crate) with_file: Option<File>,
}
Expand description
Consolidates the setup of server tracing into a helper
Fields§
§base_level: Option<String>
§extra_directives: Option<String>
§tokio_console_bind: Option<SocketAddr>
§with_jaeger: bool
§with_file: Option<File>
Implementations§
Source§impl TracingSetup
impl TracingSetup
Sourcepub fn tokio_console_bind(&mut self, address: Option<SocketAddr>) -> &mut Self
pub fn tokio_console_bind(&mut self, address: Option<SocketAddr>) -> &mut Self
Setup a console server for tokio logging https://docs.rs/console-subscriber
Sourcepub fn with_jaeger(&mut self, enabled: bool) -> &mut Self
pub fn with_jaeger(&mut self, enabled: bool) -> &mut Self
Setup telemetry through Jaeger https://docs.rs/tracing-jaeger
pub fn with_file(&mut self, file: Option<File>) -> &mut Self
Sourcepub fn with_base_level(&mut self, level: impl Into<String>) -> &mut Self
pub fn with_base_level(&mut self, level: impl Into<String>) -> &mut Self
Sets the log level applied to most modules. Some overly chatty modules
are muted even if this is set to a lower log level, use the RUST_LOG
environment variable to override.
Sourcepub fn with_directive(&mut self, directive: &str) -> &mut Self
pub fn with_directive(&mut self, directive: &str) -> &mut Self
Add a filter directive.
Trait Implementations§
Source§impl Default for TracingSetup
impl Default for TracingSetup
Source§fn default() -> TracingSetup
fn default() -> TracingSetup
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TracingSetup
impl RefUnwindSafe for TracingSetup
impl Send for TracingSetup
impl Sync for TracingSetup
impl Unpin for TracingSetup
impl UnwindSafe for TracingSetup
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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::Request