Phoenix supports auto-instrumentation for DSPy applications, which includes tracing LLM calls made through LiteLLM. However, if you want to trace additional components or tools within DSPy, you can combine auto-instrumentation with manual instrumentation. This approach is not mutually exclusive. You can manually instrument specific parts of your application to capture additional details that are not covered by auto-instrumentation.
To manually instrument, you can use OpenTelemetry's tracing capabilities to create custom spans for the specific tools or components you want to trace. This involves setting up a tracer and using it to start and end spans around the code you want to monitor. For more details on manual instrumentation, you can refer to the <https://github.com/Arize-ai/phoenix/blob/main/docs/tracing/how-to-tracing/instrument-python.md|Phoenix documentation on manual instrumentation>.
Would you like more details on how to set up manual instrumentation alongside auto-instrumentation?
Sources:
- <https://github.com/Arize-ai/phoenix/blob/main/docs/tracing/how-to-tracing/instrument-python.md|Phoenix documentation on manual instrumentation>