pub struct ObservabilityManager { /* private fields */ }
Expand description
Observability manager
Implementations§
Source§impl ObservabilityManager
impl ObservabilityManager
Sourcepub fn new(config: ObservabilityConfig) -> Result<Self>
pub fn new(config: ObservabilityConfig) -> Result<Self>
Create a new observability manager
§Errors
Returns an error if the observability manager cannot be created
Sourcepub fn initialize(&mut self) -> Result<()>
pub fn initialize(&mut self) -> Result<()>
Initialize observability features
§Errors
Returns an error if observability features cannot be initialized
Sourcepub fn health_status(&self) -> HealthStatus
pub fn health_status(&self) -> HealthStatus
Get health status
Sourcepub fn record_db_operation<F, R>(&self, operation: &str, f: F) -> Rwhere
F: FnOnce() -> R,
pub fn record_db_operation<F, R>(&self, operation: &str, f: F) -> Rwhere
F: FnOnce() -> R,
Record a database operation
Sourcepub fn record_task_operation(&self, operation: &str, count: u64)
pub fn record_task_operation(&self, operation: &str, count: u64)
Record a task operation
Sourcepub fn record_search_operation<F, R>(&self, query: &str, f: F) -> Rwhere
F: FnOnce() -> R,
pub fn record_search_operation<F, R>(&self, query: &str, f: F) -> Rwhere
F: FnOnce() -> R,
Record a search operation
Sourcepub fn record_error(&self, error_type: &str, error_message: &str)
pub fn record_error(&self, error_type: &str, error_message: &str)
Record an error
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ObservabilityManager
impl RefUnwindSafe for ObservabilityManager
impl Send for ObservabilityManager
impl Sync for ObservabilityManager
impl Unpin for ObservabilityManager
impl UnwindSafe for ObservabilityManager
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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