openinference-instrumentation-claude-agent-sdk
OpenInference Claude Agent SDK Instrumentation
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and directly solves a concrete problem—observing Claude Agent SDK behavior in production. Install it if you run Claude agents and need traces for debugging, monitoring, or cost analysis. Pair it with openinference-instrumentation-anthropic if you also need visibility into the underlying Anthropic API calls.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Claude Agent SDK and an OTLP collector endpoint (local Phoenix, Phoenix Cloud, or Arize AX) to send traces.
- Low friction: pure Python wheel with standard OpenTelemetry dependencies.
- Actively maintained (released 2026-08-12, last commit 2026-08-14) with 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-12 (2 days) · last repo commit 2026-08-14 · 1,147 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 432,529 downloads/mo, #6,707 on PyPI
Alternatives
Verify before relying
pip install openinference-instrumentation-claude-agent-sdk
from openinference.instrumentation.claude_agent_sdk import ClaudeAgentSDKInstrumentor
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
tracer_provider = trace_sdk.TracerProvider()
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint)))
ClaudeAgentSDKInstrumentor().instrument(tracer_provider=tracer_provider)- Whether traces from query() and ClaudeSDKClient.receive_response() are automatically correlated across multi-turn conversations.
- Performance overhead of hook-based instrumentation on high-frequency tool calls.
- Whether tool span context is preserved when using openinference-instrumentation-anthropic alongside this package.
What it is and what it does
This package wraps Claude Agent SDK calls (query() and ClaudeSDKClient) with OpenTelemetry instrumentation to emit traces compatible with OpenInference conventions. Each call generates an AGENT span containing the prompt input, result output, session and model metadata, token counts, and nested TOOL spans for any tool invocations. Traces are sent to an OTLP collector—Phoenix (local or cloud), Arize AX, or any standard OpenTelemetry backend—enabling observability of agent behavior, tool usage, and LLM costs.
The package uses hook injection into the Claude Agent SDK to capture tool execution (PreToolUse, PostToolUse, PostToolUseFailure events) without modifying application code beyond a single instrumentation call. It depends on openinference-instrumentation, opentelemetry-api, opentelemetry-instrumentation, and related semantic convention packages. For deeper visibility into internal Anthropic API calls within the agent, pair it with openinference-instrumentation-anthropic.
Use it for
- Monitor agent query latency, token usage, and cost per call in production.
- Debug multi-turn conversations by viewing the full trace of prompts, responses, and tool calls.
- Analyze tool invocation patterns and failure rates across agent runs.
- Export traces to Phoenix Cloud or Arize AX for centralized LLM observability dashboards.
- Correlate agent spans with downstream application metrics in a unified OpenTelemetry backend.
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, low install friction, and directly solves a concrete problem—observing Claude Agent SDK behavior in production. Install it if you run Claude agents and need traces for debugging, monitoring, or cost analysis. Pair it with openinference-instrumentation-anthropic if you also need visibility into the underlying Anthropic API calls.
Install
openinference-instrumentation-claude-agent-sdk on PyPI
Before you install
Low friction: pure Python wheel with standard OpenTelemetry dependencies. Actively maintained (released 2026-08-12, last commit 2026-08-14) with no known vulnerabilities.
Requires Claude Agent SDK and an OTLP collector endpoint (local Phoenix, Phoenix Cloud, or Arize AX) to send traces.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install openinference-instrumentation-claude-agent-sdk
from openinference.instrumentation.claude_agent_sdk import ClaudeAgentSDKInstrumentor
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
tracer_provider = trace_sdk.TracerProvider()
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter(endpoint)))
ClaudeAgentSDKInstrumentor().instrument(tracer_provider=tracer_provider)
Verify before relying
- Whether traces from query() and ClaudeSDKClient.receive_response() are automatically correlated across multi-turn conversations.
- Performance overhead of hook-based instrumentation on high-frequency tool calls.
- Whether tool span context is preserved when using openinference-instrumentation-anthropic alongside this package.
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 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 432,529 / month, #6,707 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended 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_claude_agent_sdk-0.1.10-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 › “claude agent sdk tracing”
- openinference-instrumentation-claude-agent-sdkAuto-instruments Claude Agent SDK calls to emit…
- lmnr-claude-code-proxyA thin proxy server that routes Claude Code requests through Laminar…
- clawmetryClawMetry provides a real-time observability dashboard for AI agent…
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 lmnr-claude-code-proxy · openinference-instrumentation-agno · openinference-instrumentation-openai · openinference-instrumentation-google-adk · openinference-instrumentation-google-genai · openinference-instrumentation-mcp · claude-agent-sdk · openinference-instrumentation-openai-agents · openinference-semantic-conventions · claude-code-sdk