Skip to main content

Crate dataexcept

Crate dataexcept 

Source
Expand description

Structured errors and failure observability for Rust.

dataexcept is the Rust companion to the Python DataExcept project. It provides structured operational errors, a language-neutral error envelope, failure classification, redaction, W3C trace propagation, observability adapters, and typed data/ML infrastructure errors.

The Rust API is intentionally idiomatic rather than a mechanical port. The serialized envelope is the cross-language compatibility boundary.

Re-exports§

pub use boundaries::BoundaryContextError;
pub use boundaries::BrokerContext;
pub use boundaries::BrokerContextOptions;
pub use boundaries::BrokerOperation;
pub use boundaries::HttpContext;
pub use boundaries::OrchestratorContext;
pub use boundaries::OrchestratorContextOptions;
pub use boundaries::WorkerContext;
pub use boundaries::broker_context_from_message;
pub use boundaries::http_context_from_request;
pub use boundaries::orchestrator_context_from_step;
pub use boundaries::worker_context_from_task;
pub use broker::BrokerConnectionError;
pub use broker::BrokerTimeoutError;
pub use broker::MessageAcknowledgementError;
pub use broker::MessageConsumeError;
pub use broker::MessagePosition;
pub use broker::MessagePublishError;
pub use data::DataFormatError;
pub use data::DataLoadingError;
pub use data::DataValidationError;
pub use data::MissingColumnError;
pub use data::MissingDataError;
pub use data::SchemaMismatchError;
pub use database::DatabaseConnectionError;
pub use database::QueryExecutionError;
pub use database::TransactionError;
pub use ml::ConvergenceError;
pub use ml::CrossValidationError;
pub use ml::HyperparameterError;
pub use ml::ModelEvaluationError;
pub use ml::ModelInferenceError;
pub use ml::ModelTrainingError;
pub use ml::PredictionError;
pub use ml::TrainingTimeoutError;
pub use network::ConnectionTimeoutError;
pub use network::HostUnreachableError;
pub use network::ProtocolError;
pub use observability::InvalidOperationContext;
pub use observability::ObservabilityEvent;
pub use observability::OperationContext;
pub use observability::OperationContextBuilder;
pub use opentelemetry_integration::exception_to_otel_attributes;
pub use opentelemetry_integration::record_otel_exception;
pub use protocol::CycleRecord;
pub use protocol::ENVELOPE_SCHEMA_ID;
pub use protocol::ENVELOPE_SCHEMA_VERSION;
pub use protocol::EnvelopeNode;
pub use protocol::EnvelopeNodeKind;
pub use protocol::ExceptionRecord;
pub use protocol::TruncationMarker;
pub use redaction::fingerprint;
pub use redaction::redact_if_url;
pub use redaction::redact_secret;
pub use redaction::redact_url;
pub use redaction::redact_urls_in_text;
pub use redaction::remove_secret;
pub use schema::DtypeMismatchError;
pub use schema::IndexAlignmentError;
pub use schema::MergeKeyError;
pub use schema::SchemaEvolutionError;
pub use sentry_integration::enrich_sentry_event;
pub use trace_context::TraceContextConflict;
pub use trace_context::W3CTraceContext;
pub use trace_context::parse_traceparent;
pub use trace_context::trace_context_from_mapping;
pub use tracing_integration::emit_error;
pub use transformation::DataNormalizationError;
pub use transformation::DataTransformationError;
pub use transformation::FeatureEngineeringError;

Modules§

boundaries
Framework-neutral observability boundary adapters.
broker
Typed message-broker operation errors.
data
Typed data-ingestion and validation errors.
database
Typed database-operation errors.
ml
Typed machine-learning training, evaluation, and inference errors.
network
Typed network-operation errors.
observability
Product-neutral observability context for failures crossing boundaries.
opentelemetry_integration
Optional OpenTelemetry integration.
protocol
Consumer-side types for the full language-neutral envelope protocol.
redaction
Credential redaction compatible with the DataExcept wire contract.
schema
Typed schema and tabular-operation errors.
sentry_integration
Optional Sentry-compatible event enrichment.
trace_context
W3C Trace Context parsing without a tracing-runtime dependency.
tracing_integration
Optional integration with the tracing ecosystem.
transformation
Typed transformation errors.

Structs§

DataError
A small, structured operational error suitable for application boundaries.
ErrorEnvelope
A JSON-safe representation of an error.
FailureMetadata
Recovery-relevant metadata attached to an operational error.

Enums§

FailureKind
Classification of the underlying failure condition.
InvalidFailureMetadata
Validation failure for FailureMetadata.

Type Aliases§

Result
Convenient result alias for operations that use DataError.