FiddlerSpan

FiddlerSpan

Wrapper around OpenTelemetry span with simplified helper methods.

Initialize wrapper around an OTel span or context manager.

enter()

Enter context manager and start span.

Note: Attribute propagation now happens automatically via FiddlerSpanProcessor.

Return type: FiddlerSpan

exit(exc_type, exc_val, exc_tb)

Exit context manager, record exceptions, and end span.

Return type: Literal[False]

end()

Explicitly end the span. Must be called when using start_span().

Return type: None

set_input()

Set input data. Auto-serializes dicts/lists to JSON.

Return type: None

set_output()

Set output data. Auto-serializes dicts/lists to JSON.

Return type: None

set_attribute()

Set a custom attribute on the span.

Return type: None

update()

Bulk update multiple attributes.

Return type: None

record_exception()

Record an exception on the span.

Return type: None

set_agent_name()

Set the agent name (gen_ai.agent.name).

Return type: None

set_agent_id()

Set the agent ID (gen_ai.agent.id).

Return type: None

set_conversation_id()

Set the conversation ID (gen_ai.conversation.id).

Return type: None

Last updated

Was this helpful?