Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.honeyhive.ai/llms.txt

Use this file to discover all available pages before exploring further.

honeyhive-bundled was a temporary distribution of the Python SDK with pre-release packaging. The stable v1 SDK is published as honeyhive. Most imports stay the same because both packages expose the honeyhive Python module. The migration is mainly a dependency change plus cleanup of pre-release patterns.
Recent honeyhive-bundled releases and honeyhive v1 share the same top-level import style: from honeyhive import HoneyHiveTracer, trace, evaluate.
Use this HoneyHive migration guide: https://docs.honeyhive.ai/v2/sdk-reference/python/migration/honeyhive-bundled-to-v1.md

Explore my codebase to find where HoneyHive Python SDK dependencies and tracing setup are configured. Ask me any questions needed to understand the project context, runtime, and migration constraints. Then present a concise migration plan for my confirmation. After I confirm the plan, implement the migration changes.

What changes

Areahoneyhive-bundledhoneyhive>=1.0.0
Package namehoneyhive-bundledhoneyhive
Release channelPre-release / bundled distributionStable package
Project routingOlder examples may pass project=API key scoped routing, project= accepted in v1 but deprecated
OpenTelemetry minimum>=1.20.0>=1.41.0

1. Replace the dependency

pip uninstall honeyhive-bundled -y
pip install "honeyhive>=1.0.0"
If you use extras, install the matching extras on honeyhive:
pip install "honeyhive[openinference-openai]"
pip install "honeyhive[openinference-anthropic]"
pip install "honeyhive[openinference-langchain]"
honeyhive>=1.0.0 includes the bundled package’s OpenInference and Traceloop extras, plus additional integration extras such as LangChain, LiteLLM, OpenAI Agents, Claude Agent SDK, and AWS Strands. Run pip check after upgrading if your environment pins OpenTelemetry packages, because honeyhive v1 requires OpenTelemetry >=1.41.0. Verify the install:
import honeyhive

print(honeyhive.__version__)

2. Keep imports unchanged

Most code does not need import changes.
from honeyhive import HoneyHiveTracer, trace, evaluate
If your dependency file names the bundled package, update it:
[project]
dependencies = [
    "honeyhive-bundled[openinference-openai]>=1.0.1",
]

3. Initialize instrumentors separately

Use provider instrumentors after tracer initialization and pass tracer.provider.
from honeyhive import HoneyHiveTracer
from openinference.instrumentation.openai import OpenAIInstrumentor

tracer = HoneyHiveTracer.init(
    api_key="your-api-key",
    project="support-bot",
    instrumentors=[OpenAIInstrumentor()],
)
Initialize the tracer before any instrumentor. Instrumentors need the HoneyHive tracer provider to route spans correctly.
See OpenAI, Anthropic, and LangChain for provider-specific setup.

4. Remove project routing from new code

Stable v1 accepts project= for compatibility, but project context is inferred from the API key and project= is deprecated for v2.
import os
from honeyhive import HoneyHiveTracer

tracer = HoneyHiveTracer.init(
    api_key=os.environ["HH_API_KEY"],
    project=os.environ["HH_PROJECT"],
    source="production",
)
For existing v1 deployments, you can remove project= after confirming your API keys are scoped to the intended project.

5. Update enrichment to instance methods

If your bundled-package integration used free enrichment helpers, migrate to tracer instance methods.
from honeyhive import enrich_span, trace

@trace(event_type="tool")
def retrieve(query):
    docs = search(query)
    enrich_span(metadata={"query": query}, outputs={"docs": docs})
    return docs
See Enriching Traces.

6. Check evaluate() usage

The stable v1 experiment API expects datasets with ground_truth and functions that receive the full datapoint.
from honeyhive import evaluate
from openinference.instrumentation.openai import OpenAIInstrumentor

dataset = [
    {
        "inputs": {"question": "What is the capital of France?"},
        "ground_truth": {"answer": "Paris"},
    },
]

def run_pipeline(datapoint):
    question = datapoint["inputs"]["question"]
    return {"answer": answer(question)}

def exact_match(outputs, inputs, ground_truth):
    return {"score": outputs["answer"] == ground_truth["answer"]}

evaluate(
    function=run_pipeline,
    dataset=dataset,
    evaluators=[exact_match],
    api_key="your-api-key",
    instrumentors=[lambda: OpenAIInstrumentor()],
)
Use instrumentor factories in evaluate(), for example lambda: OpenAIInstrumentor(). The SDK creates a fresh tracer per datapoint and initializes instrumentors inside the evaluation runner, so pass a factory instead of a shared pre-initialized instrumentor.

7. Validate the migration

Run:
pip check
PYTHONWARNINGS=default python your_app.py
Confirm:
  • pip show honeyhive-bundled no longer finds an installed package
  • pip show honeyhive shows version 1.0.0 or later
  • No HoneyHiveTracer.init(..., instrumentors=...) calls remain
  • Traces appear in the expected project
  • Provider spans appear after instrumentor initialization
  • Experiments show ground_truth and evaluator scores

Migration checklist

  • Remove honeyhive-bundled from dependency files
  • Add honeyhive>=1.0.0 with matching or newer integration extras
  • Verify imports still use from honeyhive import ...
  • Initialize instrumentors after HoneyHiveTracer.init()
  • Remove project= from new initialization code after confirming project-scoped API keys
  • Prefer tracer.enrich_span() and tracer.enrich_session()
  • Confirm evaluate() uses ground_truth and datapoint-based functions
  • Run pip check and your app’s smoke tests

Migrate to SDK v1

Upgrade older SDK code to stable v1 semantics.

Migrate from Logger to v1

Replace honeyhive-logger calls with SDK v1 tracing.

SDK Overview

Choose the right SDK and integration path.

Integrations

Install and initialize provider instrumentors.

Environment Variables

Configure SDK runtime behavior.