Enum opentelemetry::metrics::AsyncRunner [−][src]
pub enum AsyncRunner { F64(Box<dyn Fn(ObserverResult<f64>) + Send + Sync>), I64(Box<dyn Fn(ObserverResult<i64>) + Send + Sync>), U64(Box<dyn Fn(ObserverResult<u64>) + Send + Sync>), Batch(Box<dyn Fn(BatchObserverResult) + Send + Sync>), }
This is supported on crate feature
metrics
only.Called when collecting async instruments
Variants
Callback for f64
observed values
Callback for i64
observed values
Callback for u64
observed values
Batch(Box<dyn Fn(BatchObserverResult) + Send + Sync>)
Callback for batch observed values
Implementations
impl AsyncRunner
[src]
impl AsyncRunner
[src]pub fn run(
&self,
instrument: &Option<Arc<dyn AsyncInstrumentCore>>,
f: fn(_: &[KeyValue], _: &[Observation])
)
[src]
pub fn run(
&self,
instrument: &Option<Arc<dyn AsyncInstrumentCore>>,
f: fn(_: &[KeyValue], _: &[Observation])
)
[src]Run accepts a single instrument and function for capturing observations of that instrument. Each call to the function receives one captured observation. (The function accepts multiple observations so the same implementation can be used for batch runners.)
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for AsyncRunner
impl Send for AsyncRunner
impl Sync for AsyncRunner
impl Unpin for AsyncRunner
impl !UnwindSafe for AsyncRunner
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,