Skip to main content
HoneyHive can trace workflows that mix providers like OpenAI, Anthropic, Azure OpenAI, and Bedrock in a single application. You do not need a separate HoneyHive project for each provider. Initialize one tracer for your app, then instrument each provider client you use.

When to use this

Use this pattern when your application:
  • Routes requests between providers for fallback or cost control
  • Compares providers side by side in the same workflow
  • Uses one provider for generation and another for classification or moderation
  • Mixes direct provider SDKs with framework-level orchestration

Basic pattern

  1. Initialize HoneyHive once for the application.
  2. Instrument each provider library with the same tracer provider.
  3. Make calls through any instrumented client as usual.
import os

from honeyhive import HoneyHiveTracer
from openinference.instrumentation.openai import OpenAIInstrumentor
from openinference.instrumentation.anthropic import AnthropicInstrumentor

tracer = HoneyHiveTracer.init(
    api_key=os.getenv("HH_API_KEY"),
    project=os.getenv("HH_PROJECT"),
)

OpenAIInstrumentor().instrument(tracer_provider=tracer.provider)
AnthropicInstrumentor().instrument(tracer_provider=tracer.provider)
All resulting spans appear in the same HoneyHive trace, so you can compare latency, cost, and output quality across providers in one session.

Common patterns

Fallback routing

Try one provider first, then fall back if the primary provider errors or times out.

Side-by-side evaluation

Send the same prompt to two providers, log both outputs, and compare them in experiments.

Specialized provider roles

Use one provider for long-form generation and another for structured extraction, moderation, or classification.

Best practices

  • Use one HoneyHive tracer per application or worker process.
  • Keep provider selection logic in metadata or span names if you want easier filtering later.
  • Use Enriching Traces to record routing decisions such as provider, fallback_used, or model_tier.
  • For cross-service provider routing, combine this pattern with Distributed Tracing.