pub struct TracingBuilder { /* private fields */ }
Available on crate feature
tracing
only.Expand description
The builder of Tracing
middleware.
See module level documentations for details.
Implementations§
Source§impl TracingBuilder
impl TracingBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creating the builder with no spans configured.
NB. This is NOT the same as TracingBuilder::default
which configures ALL default
spans.
Sourcepub fn service_ready(self, f: fn() -> Span) -> Self
pub fn service_ready(self, f: fn() -> Span) -> Self
Set a tracing::Span
builder to instrument Service::poll_ready
method.
Sourcepub fn request(self, f: fn(&AnyRequest) -> Span) -> Self
pub fn request(self, f: fn(&AnyRequest) -> Span) -> Self
Set a tracing::Span
builder to instrument Future::poll
of the Future
returned by
Service::call
.
Sourcepub fn notification(self, f: fn(&AnyNotification) -> Span) -> Self
pub fn notification(self, f: fn(&AnyNotification) -> Span) -> Self
Set a tracing::Span
builder to instrument LspService::notify
.
Sourcepub fn event(self, f: fn(&AnyEvent) -> Span) -> Self
pub fn event(self, f: fn(&AnyEvent) -> Span) -> Self
Set a tracing::Span
builder to instrument LspService::emit
.
Trait Implementations§
Source§impl Clone for TracingBuilder
impl Clone for TracingBuilder
Source§fn clone(&self) -> TracingBuilder
fn clone(&self) -> TracingBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Default for TracingBuilder
impl Default for TracingBuilder
Auto Trait Implementations§
impl Freeze for TracingBuilder
impl RefUnwindSafe for TracingBuilder
impl Send for TracingBuilder
impl Sync for TracingBuilder
impl Unpin for TracingBuilder
impl UnwindSafe for TracingBuilder
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