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 API key (see below)
  • Your LLM provider’s API key (OpenAI, Anthropic, etc.)
Go to Settings > Project > API Keys and click Create API Key. Copy the key from the modal - it will only be shown once. 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, latency, and costs. See integration guides for details: OpenAIAnthropicMore providers

Multiple Providers

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

Troubleshooting

  • Check HH_API_KEY is set correctly
  • Verify your API key is scoped 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