OperationFailure

data class OperationFailure(val error: Throwable, val duration: Duration) : ResilientEvent

Emitted after a failed operation, capturing the triggering error and the execution duration.

Note on double emission with TimeoutTriggered: When a timeout occurs, both TimeoutTriggered and OperationFailure are emitted for the same operation. TimeoutTriggered fires first (immediately before the exception propagates), then OperationFailure fires from the outer wrapper. Consumers building metrics should use TimeoutTriggered to classify timeout failures and avoid counting OperationFailure twice for the same event.

Constructors

Link copied to clipboard
constructor(error: Throwable, duration: Duration)

Properties

Link copied to clipboard

The measured execution time of the failed operation.

Link copied to clipboard

The Throwable that caused the operation to fail.