Skip to content

feat(google-genai): Support span streaming#6313

Merged
alexander-alderman-webb merged 9 commits into
masterfrom
webb/google-genai/span-first
May 22, 2026
Merged

feat(google-genai): Support span streaming#6313
alexander-alderman-webb merged 9 commits into
masterfrom
webb/google-genai/span-first

Conversation

@alexander-alderman-webb
Copy link
Copy Markdown
Contributor

@alexander-alderman-webb alexander-alderman-webb commented May 21, 2026

Note: Depends on #6314

Description

Use sentry_sdk.traces.start_span, replace Span.set_data() with StreamedSpan.set_attribute() and Span.set_status(SPANSTATUS.INTERNAL_ERROR) with StreamedSpan.status = SpanStatus.ERROR when in span streaming mode.

Parametrize tests on the trace lifecycle option.

Issues

Closes #6024

Reminders

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 21, 2026

Codecov Results 📊

282 passed | Total: 282 | Pass Rate: 100% | Execution Time: 42.55s

All tests are passing successfully.

❌ Patch coverage is 72.47%. Project has 14718 uncovered lines.

Files with missing lines (3)
File Patch % Lines
utils.py 81.06% ⚠️ 100 Missing and 57 partials
__init__.py 67.08% ⚠️ 80 Missing and 5 partials
streaming.py 92.42% ⚠️ 5 Missing and 15 partials

Generated by Codecov Action

@alexander-alderman-webb alexander-alderman-webb marked this pull request as ready for review May 21, 2026 09:07
@alexander-alderman-webb alexander-alderman-webb requested a review from a team as a code owner May 21, 2026 09:07
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit bdf8ded. Configure here.

Comment thread sentry_sdk/tracing_utils.py
Comment thread sentry_sdk/integrations/google_genai/__init__.py
Comment thread sentry_sdk/integrations/google_genai/utils.py
Comment thread sentry_sdk/integrations/google_genai/__init__.py Outdated
Copy link
Copy Markdown
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, some suggestions

Comment thread sentry_sdk/integrations/google_genai/__init__.py Outdated
Comment thread sentry_sdk/integrations/google_genai/__init__.py Outdated
Comment thread sentry_sdk/integrations/google_genai/__init__.py Outdated
Comment thread sentry_sdk/integrations/google_genai/__init__.py Outdated
Comment thread sentry_sdk/integrations/google_genai/__init__.py Outdated
Comment thread sentry_sdk/integrations/google_genai/__init__.py Outdated
Comment thread sentry_sdk/integrations/google_genai/utils.py
@alexander-alderman-webb alexander-alderman-webb merged commit 79340b4 into master May 22, 2026
155 of 157 checks passed
@alexander-alderman-webb alexander-alderman-webb deleted the webb/google-genai/span-first branch May 22, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate google_genai to span first

2 participants