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§

source

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.

source

fn create_up_down_counter( &self, name: String, units: Option<String>, description: Option<String>, ) -> Box<dyn UpDownCounter>

Create a new UpDownCounter.

source

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.

source

fn create_monotonic_counter( &self, name: String, units: Option<String>, description: Option<String>, ) -> Box<dyn MonotonicCounter>

Create a new MonotonicCounter.

source

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>>

Create a new AsyncMonotonicCounter.

source

fn create_histogram( &self, name: String, units: Option<String>, description: Option<String>, ) -> Box<dyn Histogram>

Create a new Histogram.

Implementors§