The example for operation_context_from_otel() now
runs its traced case: with otelsdk installed, it records a trace in
memory and shows the trace and span identifiers filled in from the
active span.
The tests pass with otelsdk 0.3.0, which leaves a span that ends
without an error at the "unset" status instead of
"ok".
Reject envelope depth limits beyond R’s integer range and avoid overflow when calculating JSON nesting limits.
Removed special classification for Rust-style module paths. The R package retains native R conditions and Python DataExcept envelope compatibility.
Read Rust DataExcept envelopes with dataexcept::
module paths as classed R conditions, preserving known error families
and the original module name.
Added an installed-package vignette introducing classed errors,
retry metadata, Python-compatible envelopes and failure events. Open it
with browseVignettes("dataexcept").
condition_group() reports several failures as one
error, written to the envelope as an exception group – the
exceptions array Python’s ExceptionGroup also
produces. Its message counts and lists the members, and its failure
metadata is theirs when they agree. group_members() returns
the members.collect_errors() evaluates each of its arguments,
catching the errors they signal, so that a validation step can report
every problem instead of the first.wrap_errors() re-signals an error from an expression as
a dataexcept error, with the original as its cause: the R counterpart of
the Python package’s wrap(). It can wrap warnings too, and
set failure metadata.exceptions array, a Python
ExceptionGroup included, is read back with the class
dataexcept_condition_group. An empty
exceptions array is now kept when the condition is written
back.Twenty-nine types from the Python package, with its names, fields, messages and default failure metadata. Each is tested against the envelope the Python package writes for the same arguments.
data_format_error(),
schema_mismatch_error(), data_drift_error(),
data_leakage_error(), data_imbalance_error(),
outlier_detection_error().model_evaluation_error(),
cross_validation_error(),
hyperparameter_error(),
training_timeout_error(), overfitting_error(),
underfitting_error(),
model_serialization_error(),
resource_limit_error().external_service_error(),
service_timeout_error(),
service_authentication_error(),
service_authorization_error(),
retry_limit_exceeded_error(), storage_error(),
and transaction_error() for databases.dataexcept_job_error:
authentication_error(), authorization_error(),
configuration_error(),
resource_not_found_error(),
operation_timeout_error().dataexcept_data_engineering_error:
data_transformation_error(), etl_job_error(),
batch_processing_error()."unknown".dataexcept_error.Validation failed for field 'country': 'Atlantis'), in any
locale; an integer without its L suffix; a fraction in the
fewest digits that read back exactly. A URL in a value is redacted
before a long value is shortened, so shortening cannot hide credentials
from redaction.message falls back to the default message in
the constructors whose Python class does the same
(validation_error(), api_error(),
database_connection_error(),
host_unreachable_error() and most of the new job and
pipeline errors)."did not converge in %d iterations"; the
values its placeholders match are stored on the classed warning and
written to the envelope as attributes. Plural messages are matched in
every form of the session language, and translations that reorder their
values are read in their own order. classed_warning_rules()
gains a fields column.kmeans() and medpolish()
stopping at the iteration limit, arima() when
optim() does not converge, rank tests that cannot compute
an exact p-value because of ties or zeroes (cor.test(),
wilcox.test(), ansari.test(),
ks.test()), survival’s Cox model warnings (an infinite
coefficient, running out of iterations), and lme4’s convergence checks
and singular fits.Suggests for those
tests.condition_to_pino() and
condition_to_pino_json() write a condition in the shape
Pino logs errors: the Pino profile the Python package publishes, a
projection of the envelope in which group members are
errors, attributes stay nested, and stack
appears only when there is a real one – an rlang backtrace, with
include_stack = TRUE.record_otel_exception()’s
exception.stacktrace, whatever colour support the session
has.envelope_to_pino() projects an envelope already in
hand, as JSON or as a list.pino_schema() returns the profile’s JSON Schema, which
ships with the package together with the Python package’s projection of
every reference envelope. The tests require R to reproduce each one
exactly.0.95238095238095233 for 20/21). They are now written in
the shortest form that reads back exactly, as on other platforms and as
the Python package writes them.operation_context() records where a failure happened:
labels for filtering (system, component,
operation) and identifiers of one run
(request_id, job_id,
correlation_id, trace_id,
span_id), with the fields and rules of the Python package’s
OperationContext. operation_index_fields()
returns the labels.condition_to_event() and
condition_to_event_json() write a failure event, the
envelope plus its operation context, in the format of the Python
package’s exception_to_observability_event().condition_to_otel_attributes() describes a condition as
OpenTelemetry exception attributes with the Python package’s names.record_otel_exception() records a condition on an
OpenTelemetry span, the active span of the otel package by default. It
is fail-open, and its redacted attributes replace the unredacted message
and stack trace the otel SDK would otherwise record. It also sets the
span’s status to error (set_status = TRUE), which stops the
SDK from recording the same failure a second time, unredacted, when it
escapes the span.operation_context_from_otel() fills a context’s
trace_id and span_id from the active span, so
failure events in logs correlate with traces.Suggests. Events and attributes
are tested against output generated by the Python package, and recording
against the real SDK.First release.
validation_error(), missing_column_error(),
dtype_mismatch_error(), merge_key_error(),
data_loading_error(), missing_data_error(),
model_training_error(), convergence_error(),
prediction_error(), file_read_error(),
file_write_error(),
database_connection_error(),
query_execution_error(),
host_unreachable_error(),
connection_timeout_error() and
api_error().new_dataexcept_error() defines your own.
dataexcept_classes() lists the hierarchy.failure_metadata(),
with_failure_metadata(), condition_failure()
and is_retryable(). Validation failures default to
permanent and not retryable; everything else defaults to unknown, as in
the Python package.condition_to_envelope() and
condition_to_json() write any condition, with its chain of
causes, as a DataExcept envelope (schema 1.0.0). Text is always valid
UTF-8: bytes that are not are replaced, at construction and on
export.envelope_to_condition() reads an envelope from either
language back into an R condition, mapping DataExcept types onto the R
classes. A type from a DataExcept module that R has no class for, such
as Python’s ServiceTimeoutError, is still a
dataexcept_error, so a dataexcept_error
handler catches it and is_retryable() reads its failure
record.condition_type() returns the envelope type of any
condition, including one read from an envelope.validate_envelope() and is_envelope()
check a payload against the schema’s rules.
envelope_schema() returns the schema.max_depth
(default 32): a deeper chain of records is rejected before it is walked,
and JSON nested deeper than an envelope could need is rejected before it
is parsed, with a dataexcept_envelope_error.redact_url() and redact_urls_in_text()
port the Python package’s rules and match its output exactly on the
parity cases in the test suite. Conditions are redacted at construction
and envelopes on export.with_classed_warnings() and
classify_warning() re-signal fifteen base R and stats
warning templates – non-convergence, separation, boundary fits,
rank-deficient prediction, the chi-squared approximation, zero variance,
coercion, recycling, NaN production and non-numeric
arguments – as classed warnings, recognised in any session language.
classed_warning_rules() lists them.R CMD check (R 4.1 to devel on three
platforms), lint, style, spelling, coverage, the envelope contract and
the documentation site. Releases are cut by pushing a version tag.