-
Notifications
You must be signed in to change notification settings - Fork 6.2k
feat: improve input/output detection for traces in the langwatch integration #7067
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
base: main
Are you sure you want to change the base?
feat: improve input/output detection for traces in the langwatch integration #7067
Conversation
CodSpeed Performance ReportMerging #7067 will improve performances by 15.66%Comparing Summary
Benchmarks breakdown
|
8f969f2
to
cf01678
Compare
25f6704
to
e990c11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the langwatch integration by refining how input/output data for traces is detected and updated. The changes add conditional updates for the root trace span based on the sender of the inputs.
- Update root span input when the sender is "User"
- Update root span output when the sender is "Machine"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @0xdeafcafe ! How’s it going?
I tried running your PR locally and got the following exception:
ValueError: No current trace found, could not get_current_trace(), make sure you added a @langwatch.trace() decorator
on your LLM pipeline top-level function
The current code on the main branch doesn’t throw this exception, so I’m guessing something’s off. Could you clarify what might be happening?
Hey, I'm an engineer at @langwatch. This PR improves the input/output detection for traces when the langwatch integration is enabled.
Related issue: #6909