pub struct ObservabilityClient { /* private fields */ }Expand description
Main client
Implementations§
Source§impl ObservabilityClient
impl ObservabilityClient
pub async fn new( project_id: Option<String>, service_name: Option<String>, ) -> Result<Self, ObservabilityError>
Sourcepub fn send_log(
&self,
entry: LogEntry,
) -> Result<(), SendError<Box<dyn Handle>>>
pub fn send_log( &self, entry: LogEntry, ) -> Result<(), SendError<Box<dyn Handle>>>
Public convenience API — callers never box manually
pub fn send_metric( &self, data: MetricData, ) -> Result<(), SendError<Box<dyn Handle>>>
pub fn send_trace( &self, span: TraceSpan, ) -> Result<(), SendError<Box<dyn Handle>>>
pub fn shutdown(&self) -> Result<(), SendError<Box<dyn Handle>>>
pub async fn get_identity_token(&self) -> Result<String, ObservabilityError>
Sourcepub fn generate_trace_id() -> String
pub fn generate_trace_id() -> String
Convenience IDs
pub fn generate_span_id() -> String
Trait Implementations§
Source§impl Clone for ObservabilityClient
impl Clone for ObservabilityClient
Source§fn clone(&self) -> ObservabilityClient
fn clone(&self) -> ObservabilityClient
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 moreAuto Trait Implementations§
impl Freeze for ObservabilityClient
impl RefUnwindSafe for ObservabilityClient
impl Send for ObservabilityClient
impl Sync for ObservabilityClient
impl Unpin for ObservabilityClient
impl UnwindSafe for ObservabilityClient
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> 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