Trait rama::telemetry::opentelemetry::metrics::InstrumentProvider
pub trait InstrumentProvider {
Show 16 methods
// Provided methods
fn u64_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Counter<u64>, MetricsError> { ... }
fn f64_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Counter<f64>, MetricsError> { ... }
fn u64_observable_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<u64>) + Send + Sync>>,
) -> Result<ObservableCounter<u64>, MetricsError> { ... }
fn f64_observable_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<f64>) + Send + Sync>>,
) -> Result<ObservableCounter<f64>, MetricsError> { ... }
fn i64_up_down_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<UpDownCounter<i64>, MetricsError> { ... }
fn f64_up_down_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<UpDownCounter<f64>, MetricsError> { ... }
fn i64_observable_up_down_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<i64>) + Send + Sync>>,
) -> Result<ObservableUpDownCounter<i64>, MetricsError> { ... }
fn f64_observable_up_down_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<f64>) + Send + Sync>>,
) -> Result<ObservableUpDownCounter<f64>, MetricsError> { ... }
fn u64_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Gauge<u64>, MetricsError> { ... }
fn f64_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Gauge<f64>, MetricsError> { ... }
fn i64_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Gauge<i64>, MetricsError> { ... }
fn u64_observable_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<u64>) + Send + Sync>>,
) -> Result<ObservableGauge<u64>, MetricsError> { ... }
fn i64_observable_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<i64>) + Send + Sync>>,
) -> Result<ObservableGauge<i64>, MetricsError> { ... }
fn f64_observable_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<f64>) + Send + Sync>>,
) -> Result<ObservableGauge<f64>, MetricsError> { ... }
fn f64_histogram(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Histogram<f64>, MetricsError> { ... }
fn u64_histogram(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Histogram<u64>, MetricsError> { ... }
}
Expand description
SDK implemented trait for creating instruments
Provided Methods§
fn u64_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Counter<u64>, MetricsError>
fn u64_counter( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, ) -> Result<Counter<u64>, MetricsError>
creates an instrument for recording increasing values.
fn f64_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Counter<f64>, MetricsError>
fn f64_counter( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, ) -> Result<Counter<f64>, MetricsError>
creates an instrument for recording increasing values.
fn u64_observable_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<u64>) + Send + Sync>>,
) -> Result<ObservableCounter<u64>, MetricsError>
fn u64_observable_counter( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, _callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<u64>) + Send + Sync>>, ) -> Result<ObservableCounter<u64>, MetricsError>
creates an instrument for recording increasing values via callback.
fn f64_observable_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<f64>) + Send + Sync>>,
) -> Result<ObservableCounter<f64>, MetricsError>
fn f64_observable_counter( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, _callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<f64>) + Send + Sync>>, ) -> Result<ObservableCounter<f64>, MetricsError>
creates an instrument for recording increasing values via callback.
fn i64_up_down_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<UpDownCounter<i64>, MetricsError>
fn i64_up_down_counter( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, ) -> Result<UpDownCounter<i64>, MetricsError>
creates an instrument for recording changes of a value.
fn f64_up_down_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<UpDownCounter<f64>, MetricsError>
fn f64_up_down_counter( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, ) -> Result<UpDownCounter<f64>, MetricsError>
creates an instrument for recording changes of a value.
fn i64_observable_up_down_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<i64>) + Send + Sync>>,
) -> Result<ObservableUpDownCounter<i64>, MetricsError>
fn i64_observable_up_down_counter( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, _callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<i64>) + Send + Sync>>, ) -> Result<ObservableUpDownCounter<i64>, MetricsError>
creates an instrument for recording changes of a value.
fn f64_observable_up_down_counter(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<f64>) + Send + Sync>>,
) -> Result<ObservableUpDownCounter<f64>, MetricsError>
fn f64_observable_up_down_counter( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, _callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<f64>) + Send + Sync>>, ) -> Result<ObservableUpDownCounter<f64>, MetricsError>
creates an instrument for recording changes of a value via callback.
fn u64_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Gauge<u64>, MetricsError>
fn u64_gauge( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, ) -> Result<Gauge<u64>, MetricsError>
creates an instrument for recording independent values.
fn f64_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Gauge<f64>, MetricsError>
fn f64_gauge( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, ) -> Result<Gauge<f64>, MetricsError>
creates an instrument for recording independent values.
fn i64_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
) -> Result<Gauge<i64>, MetricsError>
fn i64_gauge( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, ) -> Result<Gauge<i64>, MetricsError>
creates an instrument for recording independent values.
fn u64_observable_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<u64>) + Send + Sync>>,
) -> Result<ObservableGauge<u64>, MetricsError>
fn u64_observable_gauge( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, _callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<u64>) + Send + Sync>>, ) -> Result<ObservableGauge<u64>, MetricsError>
creates an instrument for recording the current value via callback.
fn i64_observable_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<i64>) + Send + Sync>>,
) -> Result<ObservableGauge<i64>, MetricsError>
fn i64_observable_gauge( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, _callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<i64>) + Send + Sync>>, ) -> Result<ObservableGauge<i64>, MetricsError>
creates an instrument for recording the current value via callback.
fn f64_observable_gauge(
&self,
_name: Cow<'static, str>,
_description: Option<Cow<'static, str>>,
_unit: Option<Cow<'static, str>>,
_callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<f64>) + Send + Sync>>,
) -> Result<ObservableGauge<f64>, MetricsError>
fn f64_observable_gauge( &self, _name: Cow<'static, str>, _description: Option<Cow<'static, str>>, _unit: Option<Cow<'static, str>>, _callback: Vec<Box<dyn Fn(&dyn AsyncInstrument<f64>) + Send + Sync>>, ) -> Result<ObservableGauge<f64>, MetricsError>
creates an instrument for recording the current value via callback.