trulens.core.otel.client_hooks.journal¶
trulens.core.otel.client_hooks.journal
¶
Crash-tolerant local event journal for short-lived hook processes.
Classes¶
EventJournal
¶
Persist and correlate hook events across independent processes.
Functions¶
append
¶
Append an event and return its correlated turn and terminal state.
get_turn
¶
Read all events for one turn in observation order.
conversations
¶
Discover client/conversation pairs represented in the journal.
has_exportable_turns
¶
Return whether any complete, stale, or retryable turn can be exported.
next_retry_delay
¶
Return seconds until the earliest retry or claim lease expires.
mark_exported
¶
Mark a turn exported after its complete span batch succeeds.
claim_pending_turns
¶
claim_pending_turns(
client: str,
conversation_id: str,
*,
stale_after: timedelta = timedelta(hours=24),
lease_for: timedelta = timedelta(minutes=5)
) -> List[str]
Atomically claim complete or stale turns for one exporter.