> ## 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 workflows that call OpenAI, Anthropic, Bedrock, or other providers in the same HoneyHive session with multi-provider instrumentation patterns.

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}
from honeyhive import HoneyHiveTracer
from openinference.instrumentation.openai import OpenAIInstrumentor
from openinference.instrumentation.anthropic import AnthropicInstrumentor

tracer = HoneyHiveTracer.init()  # Reads HH_INGESTION_API_KEY from your environment

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](https://docs.honeyhive.ai/v2/tracing/enrich-traces.md) to record routing decisions such as `provider`, `fallback_used`, or `model_tier`.
* For cross-service provider routing, combine this pattern with [Distributed Tracing](https://docs.honeyhive.ai/v2/tracing/distributed-tracing.md).

## Related guides

> [card] [OpenAI Integration](https://docs.honeyhive.ai/v2/integrations/openai.md)
>
> Trace OpenAI requests with HoneyHive

> [card] [Anthropic Integration](https://docs.honeyhive.ai/v2/integrations/anthropic.md)
>
> Trace Claude requests with HoneyHive

> [card] [Distributed Tracing](https://docs.honeyhive.ai/v2/tracing/distributed-tracing.md)
>
> Keep multi-service provider workflows in one trace

> [card] [Enriching Traces](https://docs.honeyhive.ai/v2/tutorials/enriching-traces.md)
>
> Add routing and quality metadata to traces


## Related topics

- [Multi-Instance Tracing](https://docs.honeyhive.ai/v2/tracing/multi-instance.md)
- [HoneyHive Tracing Concepts](https://docs.honeyhive.ai/v2/tracing/concepts.md)
- [How to integrate HoneyHive with Portkey](https://docs.honeyhive.ai/v2/integrations/portkey.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.