-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parent/child spans for ai.generateText / ai.generateText.doGenerate #4228
Comments
Which observability provider are you using? spans are linked automatically |
Using Braintrust. I figured out a fix: if I make a call to the otel SDK's |
Since this works with other integrations, my hunch is that this is an issue in the braintrust integration. I've informed the braintrust team. |
Hello from Braintrust 👋 I played around with the integration a bit today, and for me the spans do appear to be nested correctly under a single trace without having to manually start a parent span. If you can provide some sample code or more details on your tracing setup, I'd be happy to dig further. |
Which versions are you using (otel versions, ai sdk versions, braintrust versions if any) |
Well now I'm not sure what's going on... broke it down to the bare minimum repro and can't reproduce it anymore. Was definitely seeing it at some point though (screenshot as proof ha). I'll close the issue for now. |
Description
I am using the experimental_tracing option and seeing that the spans generated are all independent traces. I was expecting there to be a way to:
ai.generateText
span is a child of something elseai.generateText.doGenerate
+ai.toolCall
s be children of the top-levelai.generateText
span.Code example
This is what's happening (three independent traces):
This is what I'd like (one trace with three spans):
AI provider
@ai-sdk/openai@latest
Additional context
No response
The text was updated successfully, but these errors were encountered: