trace
¶
add_to_trace
¶
add_to_trace(event: TraceEventBase) -> None
find_in_trace
¶
Find a completion result in the trace.
Parameters:
-
name
(str
) –The name of the completion.
-
args
(Dict[str, Any]
) –The arguments of the completion.
-
trace
(Optional[TraceEngineBase]
, default:None
) –The trace to search in. Defaults to the global trace engine.
Returns:
-
Any
–The completion result if found, otherwise None.
Source code in src/appl/core/trace.py
traceable
¶
traceable(
func: Optional[Union[F, str]] = None,
*,
metadata: Optional[Dict] = None
) -> Union[F, Callable[[F], F]]
Make a function traceable.
Parameters:
-
func
(str
, default:None
) –The custom name of the function.
-
metadata
(Dict
, default:None
) –The meta information of the function to be traced.