pub struct WasmObservabilityPlugin { /* private fields */ }Expand description
Wrapper to use a WASM plugin as an ObservabilityExtension
Implementations§
Source§impl WasmObservabilityPlugin
impl WasmObservabilityPlugin
Sourcepub fn new(instance: Arc<WasmPluginInstance>) -> Self
pub fn new(instance: Arc<WasmPluginInstance>) -> Self
Create a new wrapper from a WASM instance
Trait Implementations§
Source§impl Extension for WasmObservabilityPlugin
impl Extension for WasmObservabilityPlugin
Source§fn info(&self) -> ExtensionInfo
fn info(&self) -> ExtensionInfo
Get extension information
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Cast to mutable Any for downcasting
Source§fn init(&mut self) -> KernelResult<()>
fn init(&mut self) -> KernelResult<()>
Initialize the extension
Source§fn shutdown(&mut self) -> KernelResult<()>
fn shutdown(&mut self) -> KernelResult<()>
Shutdown the extension gracefully
Source§impl ObservabilityExtension for WasmObservabilityPlugin
impl ObservabilityExtension for WasmObservabilityPlugin
Source§fn counter_inc(&self, name: &str, value: u64, labels: &[(&str, &str)])
fn counter_inc(&self, name: &str, value: u64, labels: &[(&str, &str)])
Record a counter increment
Source§fn histogram_observe(&self, name: &str, value: f64, labels: &[(&str, &str)])
fn histogram_observe(&self, name: &str, value: f64, labels: &[(&str, &str)])
Record a histogram observation
Source§fn span_event(&self, span_id: u64, name: &str, _attributes: &[(&str, &str)])
fn span_event(&self, span_id: u64, name: &str, _attributes: &[(&str, &str)])
Add an event to a span
Source§fn report_health(&self, health: &HealthInfo)
fn report_health(&self, health: &HealthInfo)
Report health status (called periodically by kernel)
Auto Trait Implementations§
impl Freeze for WasmObservabilityPlugin
impl !RefUnwindSafe for WasmObservabilityPlugin
impl Send for WasmObservabilityPlugin
impl Sync for WasmObservabilityPlugin
impl Unpin for WasmObservabilityPlugin
impl UnsafeUnpin for WasmObservabilityPlugin
impl !UnwindSafe for WasmObservabilityPlugin
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more