Skip to content
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

Add support for async and streaming responses in the Google GenAI instrumentation #3298

Merged
merged 87 commits into from
Mar 3, 2025

Conversation

michaelsafyan
Copy link
Contributor

@michaelsafyan michaelsafyan commented Feb 25, 2025

Description

This builds on #3256 to add support for async and streaming variants of the GenerateContent operation.

Change Summary:

  • generate_content.py:
    • Fix minor issues in implementation of streaming async (align to underlying library's data model of the result)
    • Removal of guards to short-circuit patching of async, streaming cases
  • tests:
    • Extend existing utilities to enable mocking streaming responses
    • Add testing coverage for streaming, async cases that validate the instrumentation
  • docs:
    • Remove async, streaming support from list of TODOS given that this PR checks that off the list

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added unit test coverage.

Does This PR Require a Core Repo Change?

  • No.

michaelsafyan and others added 30 commits February 7, 2025 17:02
Co-authored-by: Riccardo Magliocchetti <[email protected]>
@michaelsafyan michaelsafyan requested review from xrmx and aabmass March 3, 2025 16:29
@aabmass aabmass enabled auto-merge (squash) March 3, 2025 22:29
@aabmass aabmass merged commit 81eaea5 into open-telemetry:main Mar 3, 2025
712 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants