pub struct TraceForwarder { /* private fields */ }Expand description
Trace forwarder that connects to hermod-tracer
Implementations§
Source§impl TraceForwarder
impl TraceForwarder
Sourcepub fn new(config: ForwarderConfig) -> Self
pub fn new(config: ForwarderConfig) -> Self
Create a new trace forwarder
Sourcepub fn with_datapoint_store(self, store: DataPointStore) -> Self
pub fn with_datapoint_store(self, store: DataPointStore) -> Self
Attach a DataPointStore so the forwarder can serve named data points
to the acceptor on request.
The same store should be passed to [DatapointBackend::with_store] so
that dispatched trace objects are automatically stored and served.
Sourcepub fn handle(&self) -> ForwarderHandle
pub fn handle(&self) -> ForwarderHandle
Get a handle for sending traces
Sourcepub async fn run(self) -> Result<(), ForwarderError>
pub async fn run(self) -> Result<(), ForwarderError>
Run the forwarder (connects and handles protocol, reconnecting on error)
Auto Trait Implementations§
impl Freeze for TraceForwarder
impl RefUnwindSafe for TraceForwarder
impl Send for TraceForwarder
impl Sync for TraceForwarder
impl Unpin for TraceForwarder
impl UnsafeUnpin for TraceForwarder
impl UnwindSafe for TraceForwarder
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more