honeyhive[openinference-anthropic], call HoneyHiveTracer.init(), run AnthropicInstrumentor().instrument(tracer_provider=tracer.provider), and use your existing Anthropic client unchanged. See the tracing quickstart and tracer initialization guides for setup details.
Anthropic provides Claude models for chat, tool use, and vision. HoneyHive integrates with Anthropic via the OpenInference instrumentor, automatically capturing all API calls, tool use, and token usage.
How do I trace Anthropic with HoneyHive?
Tested Versions
HoneyHive’s Anthropic integration is tested against the following versions on PyPI, as of April 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:- Message completions -
client.messages.create()with inputs, outputs, and token usage - Tool use - Each tool call with arguments and results
- Streaming responses - Streamed messages with aggregated tokens
Example: Message Creation
Environment Configuration
Troubleshooting
Traces not appearing
- Check environment variables - Ensure
HH_API_KEYis set - Pass the tracer provider - The instrumentor must receive
tracer_provider=tracer.provider:
- Initialize before making calls - Call
instrument()before creating the Anthropic client
Related
Enrich Your Traces
Add user IDs and custom metadata to traces
Custom Spans
Create spans for business logic around API calls
Distributed Tracing
Trace calls across service boundaries
Using Traceloop (OpenLLMetry) Instead
If your project already uses Traceloop / OpenLLMetry, you can use its Anthropic instrumentor instead of OpenInference. The setup is identical - only the install and import paths differ.opentelemetry-instrumentation-anthropic 0.58.0 (April 2026).

