Skip to content

Ensure that the Google GenAI SDK instrumentation correctly populates "finish_reasons" on the span. #3417

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

Merged

Conversation

michaelsafyan
Copy link
Contributor

Description

Adds a test to reproduce the problem of not having gen_ai.response.finish_reasons populated correctly and to regression-proof the fix. Updates the logic in generate_content to properly update the finish_reasons.

Fixes #3416

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Integration test.

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • [N/A] Documentation has been updated

@aabmass aabmass merged commit b8018c5 into open-telemetry:main Apr 15, 2025
720 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.

Google GenAI SDK instrumentation fails to populate "finish_reasons" in the span
10 participants