-
Notifications
You must be signed in to change notification settings - Fork 678
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
VertexAI handle streaming requests #3331
base: main
Are you sure you want to change the base?
Conversation
get_genai_response_attributes(response) | ||
) | ||
|
||
for event in response_to_events( |
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.
I'm not sure this is the case for vertexai too but in other instrumentations we pass the span explicitly to the code sending events. This is because at the time we evaluate the stream response the span has been already closed
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.
This is because at the time we evaluate the stream response the span has been already closed
Isn't the span supposed to remain un-finished until the last response is received?
Anyways, calls to this function happen under the yield stmt on L148 before the "with" block from L117 exits. So the span should be accessible in Context even if it were ended.
Putting this into draft since I think we are blocked on data model a bit
|
WIP using shared context manager Properly implement uninstrument Shared code with a contextmanager tmp
Fixes #3297
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.