OpenTelemetry instrumentation for DSPy that automatically traces LLM calls, retrievers, and chain-of-thought reasoning. Current version 0.1.34, requires Python >=3.10, <3.15. Part of the Arize OpenInference ecosystem, actively maintained.
pip install openinference-instrumentation-dspyVerified import paths — ran on the pinned version, not inferred.
Installs and configures the DSPy instrumentor, then runs a simple ChainOfThought example.
Call DSPyInstrumentor().instrument() at the very start of your application, before importing dspy or any DSPy-related modules.
Use Python 3.10, 3.11, 3.12, or 3.13. Check your Python version before installing.
Use `from openinference.instrumentation.dspy import DSPyInstrumentor`.
Install with `pip install openinference-instrumentation-dspy` and use the correct import: `from openinference.instrumentation.dspy import DSPyInstrumentor`.
Call `DSPyInstrumentor().instrument()` at the start of your application. Do not call it multiple times.
Ensure DSPy is installed (pip install dspy) and instrument before any dspy usage: `DSPyInstrumentor().instrument(); import dspy`.