How-to Guides

Note

Problem-oriented documentation

These guides help you solve specific problems and accomplish particular tasks. They assume you have basic familiarity with HoneyHive and focus on practical solutions.

Quick Navigation:

Overview

How-to guides are organized by problem domain. Each guide provides step-by-step instructions to solve real-world challenges you might encounter when using HoneyHive.

When to use these guides:

  • You have a specific problem to solve

  • You need to integrate with a particular system

  • You want to implement a specific pattern or technique

  • You’re troubleshooting an issue

Getting Started

Start here - Essential setup patterns for successful HoneyHive integration:

Note

Most Common Question: “Where should I initialize the tracer?”

This guide covers 5 scenarios: local development, evaluate(), serverless (Lambda), long-running servers, and testing. Read this first to avoid common initialization pitfalls.

Migration & Compatibility

Guides for migrating from older versions and ensuring backwards compatibility.

LLM Provider Integration

Quick solutions for specific provider integration challenges. HoneyHive supports both OpenInference and OpenLLMetry instrumentors to automatically trace LLM calls from any provider with zero code changes.

Custom Tracing

Build sophisticated observability:

Testing Your Application

Test your LLM application with HoneyHive tracing:

Note

SDK Development Testing

For testing the HoneyHive SDK itself (SDK contributors), see SDK Development.

Evaluate LLM Outputs

Set up quality monitoring and evaluation:

Deploy to Production

Keep applications running reliably:

Monitor & Export

Track and export your observability data:

Build Common Patterns

Implement proven architectural patterns:

Quick Solutions:

Production Workflows:

Troubleshooting

Common issues and step-by-step solutions for HoneyHive integration challenges.

Not seeing traces in your dashboard?

  1. Check API key configuration:

    import os
    print(f"API Key set: {'HH_API_KEY' in os.environ}")
    print(f"Source set: {'HH_SOURCE' in os.environ}")  # Optional environment identifier
    
  2. Verify network connectivity:

    # Test HoneyHive API connectivity
    curl -H "Authorization: Bearer YOUR_API_KEY" https://api.honeyhive.ai/health
    
  3. Check project settings - Ensure your project name matches exactly in the HoneyHive dashboard.

Import or installation errors?

  1. Installation problems:

    # Update pip and install in clean environment
    pip install --upgrade pip
    python -m venv honeyhive-env
    source honeyhive-env/bin/activate  # Linux/Mac
    # honeyhive-env\Scripts\activate   # Windows
    pip install honeyhive
    
  2. Dependency conflicts:

    # Check for conflicts
    pip check
    
    # Use fresh virtual environment (recommended)
    python -m venv fresh-env
    source fresh-env/bin/activate
    pip install honeyhive
    
  3. Python version compatibility - HoneyHive requires Python 3.11+:

    import sys
    if sys.version_info < (3, 11):
        print("❌ Python 3.11+ required")
    else:
        print("✅ Python version compatible")
    

Tracing not working as expected?

  1. Debug trace collection:

    # Enable tracer debug logging (recommended - shows tracer internals)
    from honeyhive import HoneyHiveTracer
    tracer = HoneyHiveTracer.init(
        api_key="your-key",      # Or set HH_API_KEY environment variable
        project="your-project",  # Or set HH_PROJECT environment variable
        source="debug",          # Or set HH_SOURCE environment variable
        verbose=True             # Enable detailed debug logging for tracer
    )
    print(f"Tracer initialized: {tracer is not None}")
    
    # Alternative: Enable Python's standard debug logging (shows all modules)
    import logging
    logging.basicConfig(level=logging.DEBUG)
    
  2. Validate event_type values - Use proper EventType enum:

    from honeyhive.models import EventType
    
    # ✅ Correct usage
    with tracer.trace("my_operation", event_type=EventType.tool) as span:
        pass
    
    # ❌ Incorrect - don't use strings
    # event_type="tool"
    
  3. Instrumentor initialization order - Initialize tracer before instrumentors:

    # ✅ Correct order
    from honeyhive import HoneyHiveTracer
    
    # Step 1: Initialize HoneyHive tracer FIRST (without instrumentors)
    tracer = HoneyHiveTracer.init(
        api_key="...",           # Or set HH_API_KEY environment variable
        project="your-project"   # Or set HH_PROJECT environment variable
    )
    
    # Step 2: Initialize instrumentors separately with tracer_provider
    from openinference.instrumentation.openai import OpenAIInstrumentor
    instrumentor = OpenAIInstrumentor()
    instrumentor.instrument(tracer_provider=tracer.provider)
    

    Warning

    Common Issue: If you see “⚠️ Existing provider doesn’t support span processors”, this indicates a ProxyTracerProvider issue. The fix above resolves this by ensuring HoneyHive creates a real TracerProvider first.

Network & SSL Issues?

  1. SSL Certificate Verification Errors (SSLCertVerificationError, CERTIFICATE_VERIFY_FAILED):

    from honeyhive import HoneyHiveTracer
    
    # Option 1: Use custom CA bundle (recommended for corporate environments)
    import os
    os.environ['REQUESTS_CA_BUNDLE'] = '/path/to/ca-bundle.crt'
    
    tracer = HoneyHiveTracer.init(
        api_key="your-key",
        project="your-project"
    )
    
    # Option 2: Disable SSL verification (NOT recommended for production)
    tracer = HoneyHiveTracer.init(
        api_key="your-key",
        project="your-project",
        verify_ssl=False  # Use only for local development/testing
    )
    
  2. Corporate Proxy / Firewall Issues:

    # Set proxy environment variables
    export HTTPS_PROXY=http://proxy.company.com:8080
    export HTTP_PROXY=http://proxy.company.com:8080
    
    # Test connectivity
    curl -x $HTTPS_PROXY https://api.honeyhive.ai/health
    
    # Configure in Python code
    import os
    os.environ['HTTPS_PROXY'] = 'http://proxy.company.com:8080'
    
    from honeyhive import HoneyHiveTracer
    tracer = HoneyHiveTracer.init(api_key="your-key")
    
  3. Timeout Errors (ConnectionTimeout, ReadTimeout):

    # Increase timeout for slow networks
    tracer = HoneyHiveTracer.init(
        api_key="your-key",
        project="your-project",
        timeout=60.0  # Increase from default 30s
    )
    
  4. DNS Resolution Issues:

    # Verify DNS resolution
    nslookup api.honeyhive.ai
    
    # Test direct connectivity
    ping api.honeyhive.ai
    
    # Check SSL certificate
    openssl s_client -connect api.honeyhive.ai:443 -showcerts
    

For additional troubleshooting resources, see Production Deployment Guide for production deployment best practices or contact support.

Getting Help

If you can’t find what you’re looking for:

  1. Check the “Troubleshooting” section above for common issues

  2. Search the API Reference for API details

  3. Read Explanation for conceptual understanding

  4. Join our Discord community

  5. Email support@honeyhive.ai

Contributing:

Found a gap in our guides? We’d love to add more how-to content based on real user needs. Please let us know what problems you’re trying to solve!