Skip to content
GitHubLog inStart free
cetra is not released yet. These docs describe the development version.

DSPy

cetra can trace DSPy modules and model calls from Python through the OpenInference DSPy instrumentation.

Terminal window
pip install "cetra-sdk[dspy]" dspy
import cetra
cetra.init(instrument=["dspy"])
# Configure and call your DSPy modules as usual. They are traced from here on.

cetra reads the spans of the OpenInference DSPy instrumentation with the OpenInference convention. See Semantic conventions.

  • No captured spans of this instrumentation are in the repository. The only check is an SDK test that imports the instrumentor when the extra is installed. This page does not say which DSPy operations are traced.
  • If a field is missing, look at the span’s Attributes tab and compare it with Span attributes.