Fiddler OTel SDK
1.0
1.0.0
March 18, 2026
Initial release of the Fiddler OTel SDK as a standalone package. The core OpenTelemetry instrumentation functionality has been extracted from fiddler-langgraph into this independent package, which now serves as the foundation for all Fiddler framework integrations.
Core classes
FiddlerClient: Main client that configures and manages the OTel tracer. Handles OTLP authentication, compression, span limits, sampling, and lifecycle (flush/shutdown). Registers anatexithandler for automatic span flushing.@tracedecorator: Automatic function tracing with input/output capture. Supports sync and async functions, all four span types (span,generation,chain,tool), and decorator parameters formodel,system,user_id, andversion.get_current_span(): Retrieve the active Fiddler span inside a@trace-decorated function as a typed wrapper.get_client(): Retrieve the globalFiddlerClientsingleton.
Span wrappers
FiddlerSpan (base), FiddlerGeneration, FiddlerChain, FiddlerTool — typed wrappers with semantic convention helpers.
FiddlerGeneration:set_model(),set_system(),set_system_prompt(),set_user_prompt(),set_completion(),set_usage(),set_context(),set_messages(),set_output_messages(),set_tool_definitions()FiddlerTool:set_tool_name(),set_tool_input(),set_tool_output(),set_tool_definitions()All wrappers:
set_input(),set_output(),set_attribute(),set_agent_name(),set_agent_id(),set_conversation_id(),record_exception(),end()
Context and session
set_conversation_id(): Set the conversation ID as aContextVarthat propagates to all spans in the current thread or async task.add_session_attributes(key, value): Attach session-level metadata to all spans in the current thread or async coroutine. Emitted asfiddler.session.user.{key}and automatically propagated from parent to child spans.FiddlerSpanProcessor: OTelSpanProcessorthat auto-propagatesgen_ai.agent.name,gen_ai.agent.id,gen_ai.conversation.id,session.id, anduser.idfrom parent to child spans.Context isolation: Each
FiddlerClientuses its own isolated OTelContext, preventing interference with any existing global tracer in the application.
Configuration and debugging
JSONL local capture:
jsonl_capture_enabledandjsonl_file_pathconstructor parameters for local span capture. TheFIDDLER_JSONL_FILEenvironment variable overrides the file path whenjsonl_file_pathis not set explicitly.Console tracing:
console_tracer=Trueparameter to print spans to stdout during development.Flush and shutdown:
force_flush(),shutdown(),aflush(),ashutdown(), and context manager support.
Constants
FiddlerSpanAttributes: Constants for all Fiddler OTel span attribute keys.FiddlerResourceAttributes: Constants for Fiddler OTel resource attribute keys.SpanType: Constants for validfiddler.span.typevalues.
0.1
0.1.1
March 17, 2026
Pre-release.