recordFailure
Called when a query ultimately fails and no successful result was ever produced — covers retry exhaustion, an immediate non-retryable exception (wrong type for io.kandra.runtime.RetryConfig.retryOn, or a non-idempotent statement), and rejection because Kandra is shutting down. Has a no-op default so existing KandraMetrics implementations keep compiling unchanged — this interface is public and pluggable, so adding this hook must not be a breaking change.
Parameters
the primary table name the query targeted
same free-form operation string as record
wall-clock duration from first attempt to final failure, in milliseconds (0 for a shutdown-rejection, which fails before any attempt is made)
total number of execution attempts made before giving up (0 for a shutdown-rejection that never attempted the query at all)
the fully-qualified class name of the exception that caused the failure (falls back to the simple name, or "Unknown"/"Throwable" if unavailable)