Skip to main content
PyPI

Overview

Complete API reference documentation for the fiddler-otel package, the framework-agnostic OpenTelemetry-based instrumentation layer for any Python LLM or agent application. fiddler-otel is the canonical source for Fiddler’s span attributes, conversation tracking, and span processing primitives; the LangChain, LangGraph, and Strands SDKs build on top of it and re-export several of its symbols.
pip install fiddler-otel
from fiddler_otel import FiddlerClient, trace

Components

Attributes

Span and resource attribute helpers. set_conversation_id and add_session_attributes are propagated through the current trace context; FiddlerSpanAttributes, FiddlerResourceAttributes, and SpanType enumerate the constant keys Fiddler recognizes.

Client

Client initialization and configuration. FiddlerClient wires the OTLP exporter, span processor, and resource attributes into the global tracer provider; get_client returns the active singleton.

Decorators

Function-level tracing helpers. @trace instruments arbitrary Python functions; get_current_span returns the active span for attribute mutation inside a traced call.

JSONL Capture

JSONL span exporter for offline analysis. Writes a structured trace record per span to a local file alongside (or instead of) OTLP export, useful for debugging and reproducing customer issues.

Span Processor

Custom OpenTelemetry span processor that enriches outgoing spans with Fiddler resource attributes before export.

Span Wrapper

Manual span creation primitives for code paths that don’t fit the decorator model. FiddlerSpan is the base; FiddlerChain, FiddlerGeneration, and FiddlerTool carry semantic conventions for retrieval/agent steps, LLM calls, and tool invocations.