Skip to main content
Instrument your LangGraph or LangChain application with the Fiddler LangGraph SDK in under 10 minutes.

What You’ll Learn

By completing this quick start, you’ll:
  • Set up monitoring for a LangGraph or LangChain application
  • Send your first traces to Fiddler
  • Verify data collection in the Fiddler dashboard
  • Understand basic conversation tracking
Before you begin, ensure you have:
  • Python 3.11 or higher (up to Python 3.14)
  • Valid Fiddler account with access to your instance
  • A LangGraph or LangChain application ready for instrumentation
  • Network connectivity to your Fiddler instance
Supported Python Versions:
  • Python 3.11-3.14
Framework Compatibility:
  • LangGraph: >= 1.0.0 and < 2.0.0; LangChain Core: >= 1.3.3
Core Dependencies:The SDK automatically installs these dependencies:
  • fiddler-otel (>= 0.1.0, < 2.0.0), which brings in opentelemetry-api, opentelemetry-sdk, and opentelemetry-exporter-otlp-proto-http (>= 1.28.0)
  • langgraph (>= 1.0.0, < 2.0.0)
  • langchain-core (>= 1.3.3)
1

Set Up Your Fiddler Application

  1. Create your application in Fiddler Log in to your Fiddler instance and navigate to GenAI Applications, then click Add Application and follow the onboarding wizard to create your application. GenAI Applications page with Add Application button
  2. Copy your Application ID After creating your application, copy the Application ID: on the GenAI Applications page, open the application’s ⋯ menu and select Copy Application ID, or select Copy Application ID at the top of the application’s page. This must be a valid UUID4 format (for example, 550e8400-e29b-41d4-a716-446655440000). You’ll need this for Step 3. GenAI Applications page with an application's menu open and Copy Application ID selected
  3. Get Your API Key Go to Settings > Credentials, select Create Key, and copy the key. Fiddler shows a key only once, so store it right away. You’ll need it for Step 3. See Credentials for details. Settings Credentials page listing API keys with their names, created dates, and expiry dates
2

Install the Fiddler LangGraph SDK

Standard InstallationFor the stable release, install the Fiddler LangGraph SDK using pip:
3

Instrument Your Application

Add the Fiddler LangGraph SDK to your LangGraph or LangChain application with just a few lines of code:
Add Context and Conversation TrackingThe main goal of context setting is to enrich the telemetry data sent to Fiddler:
For AI engineers: The conversation tracking feature supports multi-turn agent interactions and helps trace decision flows across agent sessions.
Need more control? This Quick Start uses auto-instrumentation, which captures traces from LangGraph and LangChain automatically. The SDK also supports decorator-based and manual instrumentation for custom functions, non-LangGraph code, and fine-grained span control. See Instrumentation Methods in the integration guide.
4

Run a Complete Example

This example requires an OpenAI API key. You can create or find your key on the API keys page of your OpenAI account.
Here’s a complete working example to verify your setup:
Short-lived scripts: The SDK batches spans in memory and exports them on a schedule. If your script exits before the batch is sent, call fdl_client.shutdown() (or use with FiddlerClient(...) as client:) to flush pending spans. Long-running servers handle this automatically via atexit. See Flush and shutdown handling for details.
5

Verify Monitoring is Working

  1. Run your application using the example above or your own instrumented code
  2. Check the Fiddler dashboard: Navigate to GenAI Applications in your Fiddler instance
  3. Confirm active status: If Fiddler successfully receives telemetry, your application will show as Active GenAI application showing active status
Success CriteriaYou should see:
  • Application status changed to Active in the Fiddler dashboard
  • Trace data appearing within 1-2 minutes of running your example
  • Context labels match what you set in your code
  • Conversation ID visible in the trace details Explorer page listing an application's spans with their type, group, input, output, duration, and status Span tree with duration bars on the left and the selected LLM span's details on the right

Grant Team Access (optional)

Provide access to other users by assigning teams and users to the project that contains your applications. Managing permissions through Teams is recommended as a best practice. For more access control details, refer to the Teams and Users Guide and the Role-based Access Guide.
  1. Open the Settings page and select the Access tab
  2. For both Users and Teams, select the “Edit” option to the right of the name
  3. Add appropriate team members with the required permission levels

Configuration Options

Basic Configuration

Advanced Configuration

Customize Limits for High-Volume Applications

Set limits for your events, spans, and associated attributes. This is helpful for tuning reporting data to manageable numbers for highly attributed and/or high-volume applications.

Sampling Traffic

Set a specific sampling percentage for incoming data.

Environment Variables for Batch Processing

Adjust the following environment variables that the FiddlerClient will use when processing the OpenTelemetry traffic.

Compression Options

The SDK supports data compression to help reduce the overall data volume transmitted over the network. This can help improve network latency.

Environment Variables Reference

Configure OpenTelemetry batch processor behavior through environment variables: Example: Tuning for high-volume applications

LangChain Application Support

The SDK supports both LangGraph and LangChain applications. While agent names are automatically extracted from LangGraph applications by the SDK, LangChain applications need the agent name to be explicitly set using the configuration parameter:
Important: If you don’t provide an agent name for LangChain applications, it will appear as “UNKNOWN_AGENT” in the Fiddler UI. All other features, including conversation ID, LLM context, and attribute structure, work the same as with LangGraph.

Troubleshooting

Common Installation Issues

Problem: ModuleNotFoundError: No module named 'fiddler_langgraph'
  • Solution: Ensure you’ve installed the correct package: pip install fiddler-langgraph
Problem: Version conflicts with existing packages
  • Solution: Use a virtual environment or update conflicting packages

Common Configuration Issues

Problem: ValueError: application_id must be a valid UUID4
  • Solution: Ensure your Application ID is a valid UUID4 format (e.g., 550e8400-e29b-41d4-a716-446655440000)
Example:
Problem: ValueError: URL must have a valid scheme and netloc
  • Solution: Ensure your URL includes the protocol (e.g., https://your-instance.fiddler.ai)
Problem: Connection errors or timeouts
  • Solution: Check your network connectivity and Fiddler instance URL
Example: Handling connection failures gracefully
Problem: Debugging trace generation
  • Solution: Enable console tracer for local debugging:
console_tracer=True is additive — span data is printed to stdout and continues to be exported to Fiddler via OTLP. Setting this to True does not disable or suppress the OTLP export to Fiddler. Use it to visually confirm spans are being created during local development.
Problem: ImportError: cannot import name 'LangGraphInstrumentor'
  • Solution: Ensure you have the correct import path:

Verification Issues

Problem: Application not showing as “Active” in Fiddler
  • Solution: Check the following:
    1. Ensure your application executes instrumented code
    2. Verify that your Fiddler API key and application ID are correct
    3. Check network connectivity to your Fiddler instance
    4. Enable console tracer to see if traces are being generated locally

Next Steps

Now that your application is instrumented:
  1. Explore the data: Open Explorer to see your traces, then score live traffic with Evaluator Rules for Live Traffic and get email alerts with GenAI Alert Rules
  2. Custom instrumentation: Use decorator-based and manual instrumentation for fine-grained control
  3. Learn advanced features: See the LangGraph SDK Advanced Tutorial for multi-agent scenarios and production patterns
  4. Review the SDK reference: Check the Fiddler LangGraph SDK Reference for complete documentation
  5. Optimize for production: Review configuration options for high-volume applications