pub struct ObservabilityError { /* private fields */ }Expand description
Opaque observability error backed by one canonical shared error.
Implementations§
Source§impl ObservabilityError
impl ObservabilityError
Sourcepub fn feature_disabled(feature: &'static str) -> Self
pub fn feature_disabled(feature: &'static str) -> Self
Creates a failure for a requested observability feature that is disabled.
Sourcepub fn invalid_config(detail: impl Into<String>) -> Self
pub fn invalid_config(detail: impl Into<String>) -> Self
Creates an invalid-configuration failure.
Sourcepub fn metrics_init(detail: impl ToString) -> Self
pub fn metrics_init(detail: impl ToString) -> Self
Creates a metrics-initialization failure from display-only detail.
Sourcepub fn metrics_init_source(
source: impl StdError + Send + Sync + 'static,
) -> Self
pub fn metrics_init_source( source: impl StdError + Send + Sync + 'static, ) -> Self
Creates a metrics-initialization failure while retaining its typed source.
Sourcepub fn traces_init(detail: impl ToString) -> Self
pub fn traces_init(detail: impl ToString) -> Self
Creates a trace-initialization failure from display-only detail.
Sourcepub fn traces_init_source(source: impl StdError + Send + Sync + 'static) -> Self
pub fn traces_init_source(source: impl StdError + Send + Sync + 'static) -> Self
Creates a trace-initialization failure while retaining its typed source.
Sourcepub fn logs_init(detail: impl ToString) -> Self
pub fn logs_init(detail: impl ToString) -> Self
Creates a log-initialization failure from display-only detail.
Sourcepub fn logs_init_source(source: impl StdError + Send + Sync + 'static) -> Self
pub fn logs_init_source(source: impl StdError + Send + Sync + 'static) -> Self
Creates a log-initialization failure while retaining its typed source.
Sourcepub fn logging_init(detail: impl ToString) -> Self
pub fn logging_init(detail: impl ToString) -> Self
Creates a subscriber-initialization failure from display-only detail.
Sourcepub fn logging_init_source(
source: impl StdError + Send + Sync + 'static,
) -> Self
pub fn logging_init_source( source: impl StdError + Send + Sync + 'static, ) -> Self
Creates a subscriber-initialization failure while retaining its typed source.
Sourcepub fn invalid_log_filter(
_filter: impl Into<String>,
source: impl StdError + Send + Sync + 'static,
) -> Self
pub fn invalid_log_filter( _filter: impl Into<String>, source: impl StdError + Send + Sync + 'static, ) -> Self
Creates an invalid-log-filter failure while retaining the parser source.
Sourcepub fn invalid_log_filter_detail(
_filter: impl Into<String>,
detail: impl ToString,
) -> Self
pub fn invalid_log_filter_detail( _filter: impl Into<String>, detail: impl ToString, ) -> Self
Creates an invalid-log-filter failure from display-only detail.
Sourcepub fn subscriber_install_failed(attempted: bool, installed: bool) -> Self
pub fn subscriber_install_failed(attempted: bool, installed: bool) -> Self
Creates a subscriber-installation failure.
Sourcepub fn metrics_shutdown(detail: impl ToString) -> Self
pub fn metrics_shutdown(detail: impl ToString) -> Self
Creates a metrics-shutdown failure from display-only detail.
Sourcepub fn traces_shutdown(detail: impl ToString) -> Self
pub fn traces_shutdown(detail: impl ToString) -> Self
Creates a trace-shutdown failure from display-only detail.
Sourcepub fn logs_shutdown(detail: impl ToString) -> Self
pub fn logs_shutdown(detail: impl ToString) -> Self
Creates a log-shutdown failure from display-only detail.
Sourcepub fn descriptor(&self) -> &'static ErrorDescriptor
pub fn descriptor(&self) -> &'static ErrorDescriptor
Returns the catalog descriptor that owns identity and policy.
Sourcepub fn condition(&self) -> CanonicalCondition
pub fn condition(&self) -> CanonicalCondition
Returns the descriptor-owned canonical condition.
Sourcepub fn recovery_hint(&self) -> RecoveryHint
pub fn recovery_hint(&self) -> RecoveryHint
Returns the descriptor-owned recovery hint.
Sourcepub const fn operation(&self) -> ObservabilityOperation
pub const fn operation(&self) -> ObservabilityOperation
Returns the closed observability operation.
Sourcepub fn context(&self) -> &ErrorContext
pub fn context(&self) -> &ErrorContext
Returns descriptor-validated bounded context.
Sourcepub fn location(&self) -> &'static Location<'static>
pub fn location(&self) -> &'static Location<'static>
Returns the first canonical promotion location.
Sourcepub fn backtrace(&self) -> Option<&Backtrace>
pub fn backtrace(&self) -> Option<&Backtrace>
Returns the catalog-controlled backtrace, when captured.
Sourcepub fn public_view(&self) -> Result<PublicErrorView<'_>, ViewContextViolation>
pub fn public_view(&self) -> Result<PublicErrorView<'_>, ViewContextViolation>
Creates a descriptor-validated public projection.
§Errors
Returns an error only if the facade built context that violates its selected descriptor.
Sourcepub fn diagnostic_view(
&self,
) -> Result<DiagnosticView<'_>, ViewContextViolation>
pub fn diagnostic_view( &self, ) -> Result<DiagnosticView<'_>, ViewContextViolation>
Creates a descriptor-validated diagnostic projection.
§Errors
Returns an error only if the facade built context that violates its selected descriptor.
Trait Implementations§
Source§impl Clone for ObservabilityError
impl Clone for ObservabilityError
Source§impl Debug for ObservabilityError
impl Debug for ObservabilityError
Source§impl Display for ObservabilityError
impl Display for ObservabilityError
Source§impl Error for ObservabilityError
impl Error for ObservabilityError
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()