Skip to main content
This guide walks you through tracing an LLM call with HoneyHive. By the end, you’ll see your first trace in the dashboard. Expected time: 5 minutes
1

Create a project

Go to HoneyHive Projects and click New Project. Name it my-first-project.
2

Get your API key

Click on your organization name in the top-right corner and select Copy API Key.
3

Install dependencies

pip install "honeyhive>=1.0.0rc0" openai openinference-instrumentation-openai
Using a different provider? See our integration guides for Anthropic, Google, AWS Bedrock, and more.
4

Run this script

Create a new file called quickstart.py and paste the following code. Replace the placeholder values with your HoneyHive API key and project name.
from honeyhive import HoneyHiveTracer
from openinference.instrumentation.openai import OpenAIInstrumentor
from openai import OpenAI

# Initialize HoneyHive tracing
tracer = HoneyHiveTracer.init(
    api_key="your-honeyhive-api-key",
    project="my-first-project",
    source="development",  # Optional: Label where traces come from
    session_name="quickstart-session",  # Optional: Group related traces
    # server_url="https://your-instance.honeyhive.ai"  # Required for self-hosted/dedicated
)

# Add the OpenAI instrumentor
OpenAIInstrumentor().instrument(tracer_provider=tracer.provider)

# Make a traced OpenAI call
client = OpenAI()
response = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Write a fun haiku about honeybees"}]
)

print(response.choices[0].message.content)
This quickstart keeps tracing setup simple: initialize the tracer first, then initialize the instrumentor with tracer.provider.
To see where to initialize the tracer for your environment, including AWS Lambda and long-running servers, see Tracer Initialization.
Run the script:
python quickstart.py
5

View your trace

Go to the Log Store in HoneyHive. Click on your trace to see the full request and response.

What’s next?

Now that you’re tracing, try the Experiments Quickstart to run your first evaluation and compare prompt variations. Or explore our Key Concepts to understand sessions, spans, and how HoneyHive structures your trace data.