Wrapper around OpenTelemetry span with simplified helper methods.
Initialize wrapper around an OTel span or context manager.
Parameters
An OTel span or context manager.
Optional MediaUploader
for normalizing large base64 content before span export.
enter()
Enter context manager and start span.
Returns
FiddlerSpan
exit()
Exit context manager, record exceptions, and end span.
Returns
Literal[False]
end()
Explicitly end the span. Must be called when using start_span().
Set input data. Auto-serializes dicts/lists to JSON.
set_output()
Set output data. Auto-serializes dicts/lists to JSON.
set_attribute()
Set a custom attribute on the span.
update()
Bulk update multiple attributes.
record_exception()
Record an exception on the span.
set_agent_name()
Set the agent name (gen_ai.agent.name).
set_agent_id()
Set the agent ID (gen_ai.agent.id).
set_conversation_id()
Set the conversation ID (gen_ai.conversation.id).