trace
Decorator for automatic function tracing with input/output capture.
Uses the global FiddlerClient when client= is not passed. Supports async functions with proper trace isolation per task.
func
`Callable
None`
✗
None
name
`str
function name
as_type
Literal['span', 'generation', 'chain', 'tool']
span
Span type ('span', 'generation', 'chain', 'tool').
capture_input
bool
True
Capture function arguments as input.
capture_output
Capture return value as output.
client
`FiddlerClient
get_client()
model
user_id
version
system
Decorated function.
Return type: Callable
Last updated 19 days ago
Was this helpful?