Hi Peter P. ! Thank you so much for your question -- I can replicating the issue and seeing how to solve it.
this code that you have here:
client = openai.OpenAI()
response = client.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Say 'Hello from minimal test'"}],
max_tokens=10
)won't be picked up by the instrumentation here since it is designed to patch OpenAIAgents:
instrumentor = OpenAIAgentsInstrumentor()
instrumentor.instrument(tracer_provider=tracer_provider)
instead, please try using:
from openinference.instrumentation.openai import OpenAIInstrumentor
OpenAIInstrumentor().instrument(tracer_provider=tracer_provider)
Please let me know how this works for you!