Skip to main content
The ErrorObserver reports each error a pipeline raises, once, where it is raised. It tracks both errors that surface and errors that are recovered from (e.g., a service switcher failing over).

Features

  • Reports every error at its origin
  • Includes recovered errors that don’t reach the top of the pipeline
  • Provides error categorization via ErrorCategory
  • Tracks processor usability after failures
  • Deduplicates errors that travel through multiple processors

Usage

Basic Setup

JSON Logging

Log errors as structured JSON:

Configuration

Callable[[], float]
default:"time.time"
Reads the current time in seconds. Supplying one lets a test place failures without waiting.

ErrorEvent

Each error is reported as an ErrorEvent with the following fields:

Event Handlers

Notes

  • Errors are reported once per occurrence, even though they travel upstream through multiple processors
  • An error is attributed to the processor that raised it, not the ones that passed it along
  • processor_usable distinguishes transient failures (unreachable service) from permanent ones (invalid credentials)
  • Errors recovered by a processor (e.g., service switcher failover) are still reported, unlike PipelineWorker.on_pipeline_error which only sees errors that reach the top