openinference-instrumentation-anthropic
OpenInference Anthropic Instrumentation
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real observability gap for Anthropic users. If you're already using or considering OpenTelemetry and an OTLP-compatible collector, this is a straightforward way to gain visibility into LLM interactions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires an OpenTelemetry collector endpoint to receive traces; ANTHROPIC_API_KEY environment variable must be set.
- Low friction installation with a pure-Python wheel.
- Actively maintained with a release 7 days ago and no known vulnerabilities.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions.
last release 2026-08-07 (7 days) · last repo commit 2026-08-14 · 1,147 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 651,145 downloads/mo, #5,553 on PyPI
Alternatives
Verify before relying
pip install openinference-instrumentation-anthropic
from anthropic import Anthropic
from openinference.instrumentation.anthropic import AnthropicInstrumentor
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
tracer_provider = trace_sdk.TracerProvider()
AnthropicInstrumentor().instrument(tracer_provider=tracer_provider)
client = Anthropic()
response = client.messages.create(model="claude-3-opus-20240229", max_tokens=1024, messages=[{"role": "user", "content": "Hello"}])- Performance overhead of instrumentation on production Anthropic API calls.
- Whether custom span attributes and session tracking work as documented.
What it is and what it does
This package wraps Anthropic's Python client to automatically capture detailed traces of all API calls—including Messages, Completions, and their async variants—and exports them to any OpenTelemetry-compatible backend. It sits between your code and the Anthropic client, intercepting requests and responses without requiring code changes beyond a single instrumentation call.
The traces include request parameters, response data, and execution timing, formatted according to OpenInference conventions so they integrate seamlessly with observability platforms. It's designed for developers building LLM applications who need visibility into what their Anthropic calls are doing—latency, token usage, errors, and behavior patterns—without manually logging each interaction.
Use it for
- Debug Anthropic API calls in development by viewing detailed traces and attributes.
- Monitor production LLM application performance and identify slow or failing Anthropic requests.
- Track token usage and cost across Anthropic API calls for billing and optimization.
- Analyze conversation patterns and model behavior across multiple Anthropic client instances.
- Correlate Anthropic traces with other application metrics in a unified observability platform.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs with low friction, and solves a real observability gap for Anthropic users. If you're already using or considering OpenTelemetry and an OTLP-compatible collector, this is a straightforward way to gain visibility into LLM interactions.
Install
openinference-instrumentation-anthropic on PyPI
Before you install
Low friction installation with a pure-Python wheel. Actively maintained with a release 7 days ago and no known vulnerabilities. Depends on well-established OpenTelemetry and OpenInference libraries.
Requires an OpenTelemetry collector endpoint to receive traces; ANTHROPIC_API_KEY environment variable must be set.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install openinference-instrumentation-anthropic
from anthropic import Anthropic
from openinference.instrumentation.anthropic import AnthropicInstrumentor
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
tracer_provider = trace_sdk.TracerProvider()
AnthropicInstrumentor().instrument(tracer_provider=tracer_provider)
client = Anthropic()
response = client.messages.create(model="claude-3-opus-20240229", max_tokens=1024, messages=[{"role": "user", "content": "Hello"}])
Verify before relying
- Performance overhead of instrumentation on production Anthropic API calls.
- Whether custom span attributes and session tracking work as documented.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release <3.15,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 7 packagesopeninference-instrumentationopeninference-semantic-conventionsopentelemetry-apiopentelemetry-instrumentationopentelemetry-semantic-conventionstyping-extensionswrapt |
| Maintenance | Actively maintained 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 651,145 / month, #5,553 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: openinference_instrumentation_anthropic-1.1.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “anthropic api tracing”
- openinference-instrumentation-anthropicAutomatically captures and exports traces from Anthropic API calls to…
- opentelemetry-instrumentation-anthropicAdds OpenTelemetry tracing to Anthropic API calls, capturing prompts,…
- openinference-instrumentation-litellmAuto-instruments LiteLLM function calls (completion, embedding, image…
Give your agent the search over MCP, or paste the wish link into any chat.
More Monitoring packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.
Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.
Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.
Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.
Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.
Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.
Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.
Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.
See also openinference-instrumentation-agno · openinference-instrumentation-haystack · openinference-instrumentation-llama-index · openinference-instrumentation-bedrock · openinference-instrumentation-litellm · openinference-instrumentation-pydantic-ai · openinference-instrumentation-openai · openinference-instrumentation-dspy · arize · arize-phoenix-client