Share via


Add traces to applications: automatic and manual tracing

Learn about the different approaches you can take to add traces to Python and TypeScript generative AI application.

MLflow has three approaches to tracing for Python and TypeScript.

Which approach should I use?

Start with automatic tracing. It's the fastest way to get traces working. Add manual tracing later if you need more control.

Scenario Recommendations
Use one GenAI library Use automatic tracing for your selected library
Use LLM SDKs directly
  • Use automatic tracing for the API library
  • Add manual tracing decorators to combine multiple LLM calls into a single trace
Use multiple GenAI libraries or SDKs
  • Enable automatic tracing for each framework / SDK
  • Add manual tracing decorators to combine calls to multiple frameworks or SDKs into a single trace
All other scenarios or you need more control Use manual tracing: