pub struct TelemetryClient { /* private fields */ }Implementations§
Source§impl TelemetryClient
impl TelemetryClient
pub fn new(base_url: &str, token: Option<String>, instance: String) -> Self
Sourcepub fn push_event(&self, log: &RequestLog)
pub fn push_event(&self, log: &RequestLog)
Push a completed request event — spawns a background task, never blocks.
Sourcepub async fn push_heartbeat(&self, status: Value)
pub async fn push_heartbeat(&self, status: Value)
Push a full status snapshot as a heartbeat. Called periodically from a background task — awaited by the caller so they can control the cadence.
Trait Implementations§
Source§impl Clone for TelemetryClient
impl Clone for TelemetryClient
Source§fn clone(&self) -> TelemetryClient
fn clone(&self) -> TelemetryClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TelemetryClient
impl !RefUnwindSafe for TelemetryClient
impl Send for TelemetryClient
impl Sync for TelemetryClient
impl Unpin for TelemetryClient
impl UnsafeUnpin for TelemetryClient
impl !UnwindSafe for TelemetryClient
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> 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