> ## 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.

# Multi-Provider Tracing

> Trace applications that call more than one LLM provider in the same workflow.

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.

```python theme={null}
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](/v2/tracing/enrich-traces) to record routing decisions such as `provider`, `fallback_used`, or `model_tier`.
* For cross-service provider routing, combine this pattern with [Distributed Tracing](/v2/tracing/distributed-tracing).

## Related guides

<CardGroup cols={2}>
  <Card title="OpenAI Integration" icon="robot" href="/v2/integrations/openai">
    Trace OpenAI requests with HoneyHive
  </Card>

  <Card title="Anthropic Integration" icon="message" href="/v2/integrations/anthropic">
    Trace Claude requests with HoneyHive
  </Card>

  <Card title="Distributed Tracing" icon="diagram-project" href="/v2/tracing/distributed-tracing">
    Keep multi-service provider workflows in one trace
  </Card>

  <Card title="Enriching Traces" icon="sparkles" href="/v2/tutorials/enriching-traces">
    Add routing and quality metadata to traces
  </Card>
</CardGroup>
