Trait aws_smithy_observability::meter::Meter
source · pub trait Meter: Send + Sync + Debug {
// Required methods
fn create_gauge(
&self,
name: String,
callback: Box<dyn Fn(&dyn AsyncMeasurement<Value = f64>) + Send + Sync>,
units: Option<String>,
description: Option<String>,
) -> Box<dyn AsyncMeasurement<Value = f64>>;
fn create_up_down_counter(
&self,
name: String,
units: Option<String>,
description: Option<String>,
) -> Box<dyn UpDownCounter>;
fn create_async_up_down_counter(
&self,
name: String,
callback: Box<dyn Fn(&dyn AsyncMeasurement<Value = i64>) + Send + Sync>,
units: Option<String>,
description: Option<String>,
) -> Box<dyn AsyncMeasurement<Value = i64>>;
fn create_monotonic_counter(
&self,
name: String,
units: Option<String>,
description: Option<String>,
) -> Box<dyn MonotonicCounter>;
fn create_async_monotonic_counter(
&self,
name: String,
callback: Box<dyn Fn(&dyn AsyncMeasurement<Value = u64>) + Send + Sync>,
units: Option<String>,
description: Option<String>,
) -> Box<dyn AsyncMeasurement<Value = u64>>;
fn create_histogram(
&self,
name: String,
units: Option<String>,
description: Option<String>,
) -> Box<dyn Histogram>;
}
Expand description
The entry point to creating instruments. A grouping of related metrics.
Required Methods§
sourcefn create_gauge(
&self,
name: String,
callback: Box<dyn Fn(&dyn AsyncMeasurement<Value = f64>) + Send + Sync>,
units: Option<String>,
description: Option<String>,
) -> Box<dyn AsyncMeasurement<Value = f64>>
fn create_gauge( &self, name: String, callback: Box<dyn Fn(&dyn AsyncMeasurement<Value = f64>) + Send + Sync>, units: Option<String>, description: Option<String>, ) -> Box<dyn AsyncMeasurement<Value = f64>>
Create a new Gauge.
sourcefn create_up_down_counter(
&self,
name: String,
units: Option<String>,
description: Option<String>,
) -> Box<dyn UpDownCounter>
fn create_up_down_counter( &self, name: String, units: Option<String>, description: Option<String>, ) -> Box<dyn UpDownCounter>
Create a new UpDownCounter.
sourcefn create_async_up_down_counter(
&self,
name: String,
callback: Box<dyn Fn(&dyn AsyncMeasurement<Value = i64>) + Send + Sync>,
units: Option<String>,
description: Option<String>,
) -> Box<dyn AsyncMeasurement<Value = i64>>
fn create_async_up_down_counter( &self, name: String, callback: Box<dyn Fn(&dyn AsyncMeasurement<Value = i64>) + Send + Sync>, units: Option<String>, description: Option<String>, ) -> Box<dyn AsyncMeasurement<Value = i64>>
Create a new AsyncUpDownCounter.
sourcefn create_monotonic_counter(
&self,
name: String,
units: Option<String>,
description: Option<String>,
) -> Box<dyn MonotonicCounter>
fn create_monotonic_counter( &self, name: String, units: Option<String>, description: Option<String>, ) -> Box<dyn MonotonicCounter>
Create a new MonotonicCounter.