metrics
Performance metrics and tracking utilities.
Functions
track_duration
def track_duration(operation_name: str, context: str = {}) -> Iterator[None]
Track the duration of an operation.
Usage: with track_duration("pdf_extraction", document_id="doc-123"):
operation code
pass
Args: operation_name: Name of the operation being tracked **context: Additional context fields to include in log