pub struct ClientGroupedStats { /* private fields */ }Expand description
Aggregated stats for spans grouped by aggregation key.
Contains both the aggregation key fields (service, name, resource, etc.) and the aggregated values (hits, errors, duration, latency distributions).
Implementations§
Source§impl ClientGroupedStats
impl ClientGroupedStats
Sourcepub fn new(
service: impl Into<MetaString>,
name: impl Into<MetaString>,
resource: impl Into<MetaString>,
) -> Self
pub fn new( service: impl Into<MetaString>, name: impl Into<MetaString>, resource: impl Into<MetaString>, ) -> Self
Creates a new ClientGroupedStats with the required aggregation key fields.
Sourcepub fn with_http_status_code(self, http_status_code: u32) -> Self
pub fn with_http_status_code(self, http_status_code: u32) -> Self
Sets the HTTP status code.
Sourcepub fn with_span_type(self, span_type: impl Into<MetaString>) -> Self
pub fn with_span_type(self, span_type: impl Into<MetaString>) -> Self
Sets the span type.
Sourcepub fn with_db_type(self, db_type: impl Into<MetaString>) -> Self
pub fn with_db_type(self, db_type: impl Into<MetaString>) -> Self
Sets the database type.
Sourcepub fn with_span_kind(self, span_kind: impl Into<MetaString>) -> Self
pub fn with_span_kind(self, span_kind: impl Into<MetaString>) -> Self
Sets the span kind.
Sets the peer tags.
Sourcepub fn with_is_trace_root(self, is_trace_root: Option<bool>) -> Self
pub fn with_is_trace_root(self, is_trace_root: Option<bool>) -> Self
Sets whether this is a trace root.
Sourcepub fn with_grpc_status_code(
self,
grpc_status_code: impl Into<MetaString>,
) -> Self
pub fn with_grpc_status_code( self, grpc_status_code: impl Into<MetaString>, ) -> Self
Sets the gRPC status code.
Sourcepub fn with_http_method(self, http_method: impl Into<MetaString>) -> Self
pub fn with_http_method(self, http_method: impl Into<MetaString>) -> Self
Sets the HTTP method.
Sourcepub fn with_http_endpoint(self, http_endpoint: impl Into<MetaString>) -> Self
pub fn with_http_endpoint(self, http_endpoint: impl Into<MetaString>) -> Self
Sets the HTTP endpoint.
Sourcepub fn with_errors(self, errors: u64) -> Self
pub fn with_errors(self, errors: u64) -> Self
Sets the error count.
Sourcepub fn with_duration(self, duration: u64) -> Self
pub fn with_duration(self, duration: u64) -> Self
Sets the total duration in nanoseconds.
Sourcepub fn with_ok_summary(self, ok_summary: Vec<u8>) -> Self
pub fn with_ok_summary(self, ok_summary: Vec<u8>) -> Self
Sets the DDSketch summary for successful spans.
Sourcepub fn with_error_summary(self, error_summary: Vec<u8>) -> Self
pub fn with_error_summary(self, error_summary: Vec<u8>) -> Self
Sets the DDSketch summary for error spans.
Sourcepub fn with_synthetics(self, synthetics: bool) -> Self
pub fn with_synthetics(self, synthetics: bool) -> Self
Sets the synthetics traffic flag.
Sourcepub fn with_top_level_hits(self, top_level_hits: u64) -> Self
pub fn with_top_level_hits(self, top_level_hits: u64) -> Self
Sets the top-level hit count.
Sourcepub fn http_status_code(&self) -> u32
pub fn http_status_code(&self) -> u32
Returns the HTTP status code.
Returns the peer tags.
Sourcepub fn is_trace_root(&self) -> Option<bool>
pub fn is_trace_root(&self) -> Option<bool>
Returns whether this is a trace root.
Sourcepub fn grpc_status_code(&self) -> &str
pub fn grpc_status_code(&self) -> &str
Returns the gRPC status code.
Sourcepub fn http_method(&self) -> &str
pub fn http_method(&self) -> &str
Returns the HTTP method.
Sourcepub fn http_endpoint(&self) -> &str
pub fn http_endpoint(&self) -> &str
Returns the HTTP endpoint.
Sourcepub fn ok_summary(&self) -> &[u8] ⓘ
pub fn ok_summary(&self) -> &[u8] ⓘ
Returns the DDSketch summary for successful spans.
Sourcepub fn error_summary(&self) -> &[u8] ⓘ
pub fn error_summary(&self) -> &[u8] ⓘ
Returns the DDSketch summary for error spans.
Sourcepub fn synthetics(&self) -> bool
pub fn synthetics(&self) -> bool
Returns the synthetics traffic flag.
Sourcepub fn top_level_hits(&self) -> u64
pub fn top_level_hits(&self) -> u64
Returns the top-level hit count.
Trait Implementations§
Source§impl Clone for ClientGroupedStats
impl Clone for ClientGroupedStats
Source§fn clone(&self) -> ClientGroupedStats
fn clone(&self) -> ClientGroupedStats
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientGroupedStats
impl Debug for ClientGroupedStats
Source§impl Default for ClientGroupedStats
impl Default for ClientGroupedStats
Source§fn default() -> ClientGroupedStats
fn default() -> ClientGroupedStats
Source§impl PartialEq for ClientGroupedStats
impl PartialEq for ClientGroupedStats
impl StructuralPartialEq for ClientGroupedStats
Auto Trait Implementations§
impl Freeze for ClientGroupedStats
impl RefUnwindSafe for ClientGroupedStats
impl Send for ClientGroupedStats
impl Sync for ClientGroupedStats
impl Unpin for ClientGroupedStats
impl UnwindSafe for ClientGroupedStats
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
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>
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
fn track_allocations(self, token: AllocationGroupToken) -> Tracked<Self>
Tracked wrapper. Read more§fn in_current_allocation_group(self) -> Tracked<Self>
fn in_current_allocation_group(self) -> Tracked<Self>
Tracked wrapper. Read more