Skip to main content
DSPy traces can include module inputs, outputs, prompts, completions, and optimizer data. Review Data Governance before enabling production traffic.

Install

Setup

Module/program/optimizer spans nest properly and carry dspy.module, dspy.signature, plus standard OpenInference input.value / output.value. Pair with a provider instrumentation (e.g. OpenAIInstrumentor) for the deepest trace tree.

Alternative: MLflow

If you already use MLflow, mlflow.dspy.autolog() works too: Agnost reads mlflow.spanInputs / mlflow.spanOutputs.

Verify

Run one DSPy module call, then open Raw logs in Agnost. Confirm dspy.module and input/output attributes are present.

Troubleshooting

  • Instrument DSPy before calling modules.
  • Pair DSPy instrumentation with provider instrumentation if you need LLM-level spans.
  • Confirm OTEL_EXPORTER_OTLP_HEADERS contains X-Agnost-Org-ID=<your-org-id>.

References