Skip to main content
Azure OpenAI provides OpenAI models hosted on Azure infrastructure. HoneyHive integrates with Azure OpenAI using the same OpenInference OpenAI instrumentor, automatically capturing all API calls, tool use, and token usage.

Quick Start

Add HoneyHive tracing in just 4 lines of code. Azure OpenAI uses the same openai Python package and the same instrumentor as standard OpenAI.
To see where to initialize the tracer for your environment, including AWS Lambda and long-running servers, see Tracer Initialization.
Azure OpenAI uses the standard openai Python package with the AzureOpenAI client class. The same OpenAIInstrumentor works for both.

Tested Versions

HoneyHive’s Azure OpenAI integration is tested against the following versions on PyPI, as of May 2026. Newer patch releases are generally safe; if you hit an issue, pin to these versions to reproduce a known-good configuration. Requires Python 3.11+.

What Gets Traced

The instrumentor automatically captures:
  • Chat completions - client.chat.completions.create() with inputs, outputs, and token usage
  • Tool / function calls - Each tool call with arguments and results
  • Embeddings - client.embeddings.create() requests
  • Streaming responses - Streamed completions with aggregated tokens
No manual instrumentation required.

Example: Basic Chat Completion


Environment Configuration


Troubleshooting

Traces not appearing

  1. Check environment variables - Ensure HH_API_KEY is set
  2. Pass the tracer provider - The instrumentor must receive tracer_provider=tracer.provider:
  1. Initialize before making calls - Call instrument() before creating the AzureOpenAI client

Deployment name vs model name

In Azure OpenAI, the model parameter is your deployment name, not the underlying model name:

OpenAI Integration

Standard OpenAI API integration

Enrich Your Traces

Add user IDs and custom metadata to traces

Distributed Tracing

Trace calls across service boundaries

Using Traceloop (OpenLLMetry) Instead

If your project already uses Traceloop / OpenLLMetry, you can use its OpenAI instrumentor instead of OpenInference. The setup is identical - only the install and import paths differ.

Tested Versions


Resources