Skip to main content
You have working LLM code and want to add observability without rewriting anything. This guide shows you how to add HoneyHive tracing with a few lines in your app’s entry point or runtime setup layer, with no changes to your existing logic. What you need:
  • A HoneyHive ingestion API key (see below)
  • Your LLM provider’s API key (OpenAI, Anthropic, etc.)
Go to Settings > Project > API Keys. The page opens on the Ingestion tab. Click Create API Key, name the key, and click Create Key. Copy the key from the dialog and store it as HH_INGESTION_API_KEY - it is only shown once. An ingestion key can only send traces and events. To run experiments or read data back, also create a data plane key on the Data Plane tab with the permissions those calls need, store it as HH_DATA_PLANE_API_KEY, and pass your project ID as project_id on each call (Python SDK 1.9.0 or later for evaluate() and event reads). See Ingestion keys and Using a data plane key. Time: 5 minutes

Three Steps to Add Tracing

1. Install HoneyHive

2. Add 5 Lines in Your App’s Runtime Entry Point

Keep the order the same in every runtime: initialize HoneyHiveTracer first, then initialize instrumentors with tracer.provider.
For the full runtime-specific patterns, see Tracer Initialization.

3. Run Your App

View traces at app.us.honeyhive.ai → your project → Traces.

Integration Examples

Example 1: Simple Chatbot

That’s it - a small runtime setup block, zero changes to your existing functions.

Example 2: Multi-Step Application

Both LLM calls are traced automatically. You’ll see the complete chain in HoneyHive.
For production, use environment variables instead of hardcoding keys:
Set these environment variables:

What Gets Traced?

All LLM SDK calls are traced automatically, including:
  • Chat completions, embeddings, and streaming
  • Function/tool calling
  • Multi-turn conversations
Each trace captures model, prompts, responses, tokens, and latency. To track cost, set metadata.cost on your events. See Enrich traces and Session Aggregations. See integration guides for details: OpenAI • Anthropic • More providers

Multiple Providers

Using OpenAI and Anthropic in the same app? Initialize both instrumentors with the same tracer:

Troubleshooting

  • Check HH_INGESTION_API_KEY is set correctly
  • Verify your ingestion key belongs to the HoneyHive project you’re viewing
  • Wait 2-3 seconds for processing
  • Look for errors in console output
Install with the extras for your provider:
Add it in the entry point or runtime setup layer where your app boots. For scripts, that is often main.py or app.py. For Lambda, use cached setup outside the handler. For FastAPI, Flask, or Django, initialize once at app startup and create a session per request. See Tracer Initialization for the runtime-specific patterns.
For more help, see Troubleshooting Guide or join our Discord.

What’s Next?

Enrich Your Traces

Add metadata, user feedback, and custom evaluations

Production Best Practices

Deploy tracing to production with proper configuration