DSPy traces can include module inputs, outputs, prompts, completions, and optimizer data. Review Data Governance before enabling production traffic.
Install
Setup
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. Confirmdspy.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_HEADERScontainsX-Agnost-Org-ID=<your-org-id>.
