pub struct TelemetryCatalog {
pub metrics_enabled: bool,
pub required_log_dimensions: BTreeSet<DimensionKey>,
pub metrics: BTreeMap<MetricName, MetricDefinition>,
pub trace: TracePolicy,
pub error_categories: BTreeSet<ErrorCategory>,
/* private fields */
}Fields§
§metrics_enabled: bool§required_log_dimensions: BTreeSet<DimensionKey>§metrics: BTreeMap<MetricName, MetricDefinition>§trace: TracePolicy§error_categories: BTreeSet<ErrorCategory>Implementations§
Source§impl TelemetryCatalog
impl TelemetryCatalog
pub fn baseline( config: &ObservabilityConfig, environment: Environment, ) -> Result<Self, ObservabilityError>
pub fn metric(&self, name: &str) -> Option<&MetricDefinition>
pub fn metric_reading(&self, name: &str) -> Option<MetricReading>
pub fn increment_counter(&self, name: &str, delta: u64) -> bool
pub fn adjust_gauge(&self, name: &str, delta: i64) -> bool
pub fn record_histogram(&self, name: &str, sample: u64) -> bool
pub fn set_gauge(&self, name: &str, value: i64) -> bool
pub fn record_trace(&self, trace: TraceRecord) -> bool
pub fn recent_traces(&self, limit: usize) -> Vec<TraceRecord>
Trait Implementations§
Source§impl Clone for TelemetryCatalog
impl Clone for TelemetryCatalog
Source§fn clone(&self) -> TelemetryCatalog
fn clone(&self) -> TelemetryCatalog
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 moreSource§impl Debug for TelemetryCatalog
impl Debug for TelemetryCatalog
Source§impl PartialEq for TelemetryCatalog
impl PartialEq for TelemetryCatalog
impl Eq for TelemetryCatalog
Auto Trait Implementations§
impl Freeze for TelemetryCatalog
impl RefUnwindSafe for TelemetryCatalog
impl Send for TelemetryCatalog
impl Sync for TelemetryCatalog
impl Unpin for TelemetryCatalog
impl UnsafeUnpin for TelemetryCatalog
impl UnwindSafe for TelemetryCatalog
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.