openinference-instrumentation-dspy
OpenInference DSPy Instrumentation
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and provides essential observability for DSPy applications. If you are developing or debugging DSPy programs, this instrumentation is straightforward to add and immediately useful for understanding execution flow. The Apache-2.0 license poses no restriction.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; requires a running OpenTelemetry collector endpoint (e.g., Arize Phoenix) to receive and visualize traces.
- Low install friction with a pure Python wheel.
- The package is actively maintained (last commit 2026-08-14, release 7 days old) and depends on well-established OpenTelemetry and OpenInference libraries, all of which are standard instrumentation infrastructure.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in most commercial and open-source projects without significant restriction.
last release 2026-08-07 (7 days) · last repo commit 2026-08-14 · 1,147 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 207,382 downloads/mo, #9,553 on PyPI
Alternatives
Verify before relying
pip install openinference-instrumentation-dspy
from openinference.instrumentation.dspy import DSPyInstrumentor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
from opentelemetry import trace as trace_api
from opentelemetry.sdk import trace as trace_sdk
tracer_provider = trace_sdk.TracerProvider()
trace_api.set_tracer_provider(tracer_provider)
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter("http://127.0.0.1:6006/v1/traces")))
DSPyInstrumentor().instrument()- Whether the package supports tracing of all DSPy module types or only specific ones like ChainOfThought.
- Performance overhead of instrumentation on DSPy execution time and memory usage.
- Whether custom span attributes and session tracking work with all OpenTelemetry exporters or only specific ones.
What it is and what it does
This package wraps DSPy applications with OpenTelemetry instrumentation, automatically capturing execution traces without requiring code changes to your DSPy modules. It integrates with the OpenInference standard, making traces compatible with observability platforms like Arize Phoenix and Arize AX for visualization and debugging.
The instrumentation works by hooking into DSPy's execution flow and emitting spans that describe each step of your program's reasoning and module calls. You configure it once with a tracer provider and exporter, then call `DSPyInstrumentor().instrument()` to enable tracing for all DSPy code in your application. Traces are sent to your chosen collector endpoint, where you can inspect them in a web UI to understand what your DSPy program is doing, debug failures, and optimize performance.
Use it for
- Debug DSPy program behavior by viewing step-by-step execution traces in Arize Phoenix or Arize AX.
- Monitor DSPy application performance and identify bottlenecks in module execution and LM calls.
- Track DSPy program optimization results by comparing traces before and after teleprompter compilation.
- Audit DSPy reasoning chains to understand how your program arrived at specific answers.
- Integrate DSPy tracing into a broader observability stack using standard OpenTelemetry exporters.
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 provides essential observability for DSPy applications. If you are developing or debugging DSPy programs, this instrumentation is straightforward to add and immediately useful for understanding execution flow. The Apache-2.0 license poses no restriction.
Install
openinference-instrumentation-dspy on PyPI
Before you install
Low install friction with a pure Python wheel. The package is actively maintained (last commit 2026-08-14, release 7 days old) and depends on well-established OpenTelemetry and OpenInference libraries, all of which are standard instrumentation infrastructure.
Requires Python 3.10 or later; requires a running OpenTelemetry collector endpoint (e.g., Arize Phoenix) to receive and visualize traces.
License in practice
Apache-2.0 permissive license allows use in most commercial and open-source projects without significant restriction.
Quickstart
pip install openinference-instrumentation-dspy
from openinference.instrumentation.dspy import DSPyInstrumentor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import SimpleSpanProcessor
from opentelemetry import trace as trace_api
from opentelemetry.sdk import trace as trace_sdk
tracer_provider = trace_sdk.TracerProvider()
trace_api.set_tracer_provider(tracer_provider)
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter("http://127.0.0.1:6006/v1/traces")))
DSPyInstrumentor().instrument()
Verify before relying
- Whether the package supports tracing of all DSPy module types or only specific ones like ChainOfThought.
- Performance overhead of instrumentation on DSPy execution time and memory usage.
- Whether custom span attributes and session tracking work with all OpenTelemetry exporters or only specific ones.
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 | 207,382 / month, #9,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_dspy-0.1.39-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 › “dspy tracing instrumentation”
- openinference-instrumentation-dspyAuto-instruments DSPy applications to generate…
- opentelemetry-instrumentation-pymemcacheAdds OpenTelemetry tracing instrumentation to pymemcache client…
- opentelemetry-instrumentation-pymysqlAdds OpenTelemetry tracing instrumentation to PyMySQL database…
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-google-genai · openinference-instrumentation-agno · openinference-instrumentation-llama-index · openinference-instrumentation-haystack · openinference-instrumentation-anthropic · openinference-instrumentation-pydantic-ai · openinference-instrumentation-openai · openinference-instrumentation-mcp · openinference-instrumentation-google-adk · libhoney