A ChatCompletion trace should appear under `Task: __write__sql` if your experiment's task function calls the OpenAI ChatCompletion API and you have properly instrumented your code with `openinference-instrumentation-openai`. If it's missing, common causes are: the OpenAI client is not being instrumented, the tracer provider is not registered before the API call, or the task function is not actually invoking the OpenAI API as expected. Double-check that `OpenAIInstrumentor().instrument(tracer_provider=...)` is called before any OpenAI API usage in your experiment code, and that the task function is making a direct OpenAI call, not through an uninstrumented wrapper or cache. See <https://github.com/Arize-ai/phoenix/blob/main/docs/datasets-and-experiments/how-to-experiments/run-experiments.md|run experiments guide> and <https://github.com/Arize-ai/openinference/blob/main/python/instrumentation/openinference-instrumentation-openai/README.md|OpenAI instrumentation quickstart>.
Would you like a step-by-step checklist to debug this further?
Sources:
- <https://github.com/Arize-ai/openinference/blob/main/python/instrumentation/openinference-instrumentation-openai/README.md|OpenAI Instrumentation Quickstart>
- <https://github.com/Arize-ai/phoenix/blob/main/docs/datasets-and-experiments/how-to-experiments/run-experiments.md|run experiments guide>