fiddler-langgraph
The official Python SDK for instrumenting GenAI Applications with Fiddler using OpenTelemetry and LangGraph. Monitor, analyze, and protect your LangGraph workflows, LLMs, and AI Agents in production.
Platform Features
- 🚀 Easy Integration - Simple Python API for LangGraph application instrumentation
- 📊 OpenTelemetry Tracing - Full distributed tracing support with configurable span limits
- 🔍 Automatic Instrumentation - Zero-config tracing for LangGraph workflows, chains, and tools
- 🎯 LLM Context Management - Set additional context for LLM processing with
set_llm_context() - 💬 Conversation Tracking - Track multi-turn conversations with
set_conversation_id() - 📈 Performance Metrics - Automatic tracking of timing, token usage, and model information
- 🛡️ Error Handling - Comprehensive error tracking with detailed stack traces
- 🔄 Flexible Configuration - Custom span limits, sampling strategies, and batch processing
- 🔒 Graceful Shutdown - Automatic
atexitflush, explicitforce_flush()/shutdown(), and context manager support - ⚡ Asyncio Support - Non-blocking
aflush()andashutdown()for async applications - 🎨 Message Serialization - Smart handling of complex message content (lists, dicts)
- 🔔 Attribute Truncation - Automatic truncation of long attribute values to prevent oversized spans
Installation
pip install fiddler-langgraph
Requirements
- Python 3.11, 3.12, 3.13, or 3.14
- LangGraph >= 1.0.0 and < 2.0.0, and
langchain-core>= 1.3.3 (installed automatically)
With Example Dependencies
To run the example scripts:
pip install fiddler-langgraph[examples]
Quick Start
from fiddler_langgraph import FiddlerClient, LangGraphInstrumentor, set_conversation_id
# Initialize the FiddlerClient
client = FiddlerClient(
application_id='your-application-id', # Must be a valid UUID4
api_key='your-api-key',
url='https://your-instance.fiddler.ai',
)
# Instrument LangGraph applications
LangGraphInstrumentor(client).instrument()
# Build and compile your LangGraph workflow as usual; every run is traced.
# Optionally group multi-turn runs into one conversation:
set_conversation_id('conversation_123')
app.invoke({'messages': [{'role': 'user', 'content': 'Write a novel'}]})
Documentation
- 📚 Complete Documentation
- 🚀 LangGraph Quick Start Guide
- 🧩 LangGraph SDK Integration Guide
- 📖 API Reference
Example Usage
Basic Instrumentation
from fiddler_langgraph import LangGraphInstrumentor
# Initialize and instrument
instrumentor = LangGraphInstrumentor(client)
instrumentor.instrument()
Setting LLM Context
from fiddler_langgraph import set_llm_context
from langchain_openai import ChatOpenAI
model = ChatOpenAI(model='gpt-4o-mini')
set_llm_context(model, 'User prefers concise responses')
Conversation Tracking
from fiddler_langgraph import set_conversation_id
import uuid
# Set conversation ID for tracking multi-turn conversations
conversation_id = str(uuid.uuid4())
set_conversation_id(conversation_id)
Advanced Configuration
from opentelemetry.sdk.trace import SpanLimits, sampling
from opentelemetry.exporter.otlp.proto.http.trace_exporter import Compression
# Custom span limits for high-volume applications
custom_limits = SpanLimits(
max_events=64,
max_links=64,
max_span_attributes=64,
max_event_attributes=64,
max_link_attributes=64,
max_span_attribute_length=4096,
)
# Sampling strategy for production
sampler = sampling.TraceIdRatioBased(0.1) # Sample 10% of traces
client = FiddlerClient(
application_id='your-app-id',
api_key='your-api-key',
url='https://your-instance.fiddler.ai',
span_limits=custom_limits,
sampler=sampler,
console_tracer=False, # Set to True for debugging (additive, does not suppress direct export)
compression=Compression.Gzip, # Enable gzip compression (default)
)
Offline / S3 Routing Mode
Set otlp_enabled=False to stop all direct OTLP export to Fiddler. Use otlp_json_capture_enabled=True to write spans to local .json files in standard OTLP JSON format, ready for ingestion by the Fiddler S3 connector. When otlp_enabled=False, api_key and url are not required.
Why is
application_idstill required? Even when not connecting to Fiddler directly,application_idis embedded in every trace file as a resource attribute. The Fiddler S3 connector reads this attribute to route ingested traces to the correct application in your Fiddler account. Obtain the UUID4 from your Fiddler application dashboard.
client = FiddlerClient(
application_id='your-app-id', # from your Fiddler dashboard — embedded in trace files
otlp_enabled=False, # no spans sent directly to Fiddler
otlp_json_capture_enabled=True, # write OTLP JSON files locally
otlp_json_output_dir='./traces', # output directory (created if absent)
)
Note on additive parameters:
console_tracer=Trueandjsonl_capture_enabled=Trueboth write output in addition to sending spans to Fiddler — they do not suppress direct OTLP export. Useotlp_enabled=Falseto fully disable direct export.
Example Notebooks
The fiddler-examples repository has quick starts, cookbooks, and integration examples, including LangGraph applications.
Version History
See the fiddler-langgraph release notes for detailed version history.
Support
Email support@fiddler.ai or contact your Fiddler Customer Success Manager.
License
Apache License 2.0
Want to see Fiddler in action? Request a demo
Metadata
Release files for fiddler-langgraph 1.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fiddler_langgraph-1.8.0.tar.gz | 17.2 kB | With provenance | Details for fiddler_langgraph-1.8.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fiddler_langgraph-1.8.0-py3-none-any.whl | Python 3 | none | any | Details for fiddler_langgraph-1.8.0-py3-none-any.whl |
Total release size: 32.1 kB
Release files / fiddler_langgraph-1.8.0.tar.gz
| Download URL | fiddler_langgraph-1.8.0.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d08f58af0fe621d64fab98d8675a9b43ff99cc18f4035ca1d4e3e9f3d268d822
|
|
BLAKE2b-256 checksum How to use checksums |
abe5c89836b8d18c6835eeba7ddaf36bdae69a29ff34d93ee22ad68e011025c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / fiddler_langgraph-1.8.0-py3-none-any.whl
| Download URL | fiddler_langgraph-1.8.0-py3-none-any.whl |
|---|---|
| Size | 14.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6007bd4be53bdf342896fe35647ec1ab730732430afa684030adf26ddefe95cc
|
|
BLAKE2b-256 checksum How to use checksums |
48fc6567946afdb8c476e0066ef38a878173b77402105cf8905d6857cc9939dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for fiddler-langgraph 1.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for fiddler_langgraph-1.8.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.