docs(metrics): clarify dead-letter counter counts attempts (fail-safe write)
Round-5 review nit on PR #920 (non-blocking): record_document_dead_lettered increments alongside the fail-safe mark_dead_letter, so the counter measures the dead-letter attempt and can sit marginally above the live marker count if a Qdrant write fails. Note it in the docstring. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
114af7bf12
commit
9b93754998
@@ -804,6 +804,11 @@ def record_document_parse_failed(reason: str) -> None:
|
|||||||
def record_document_dead_lettered(reason: str) -> None:
|
def record_document_dead_lettered(reason: str) -> None:
|
||||||
"""Record a document dead-lettered after a terminal parse failure.
|
"""Record a document dead-lettered after a terminal parse failure.
|
||||||
|
|
||||||
|
Counts the dead-letter *attempt*: it is incremented alongside the
|
||||||
|
``mark_dead_letter`` call, which is fail-safe (a Qdrant write error is logged,
|
||||||
|
not raised), so a transient write failure can leave this counter marginally
|
||||||
|
above the live marker count in Qdrant.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
reason: ``timeout`` | ``oom`` | ``error`` (the terminal parse failure
|
reason: ``timeout`` | ``oom`` | ``error`` (the terminal parse failure
|
||||||
reason carried from the isolated worker) or ``oversize`` (rejected by
|
reason carried from the isolated worker) or ``oversize`` (rejected by
|
||||||
|
|||||||
Reference in New Issue
Block a user