Skip to content

feat(litellm): Support span streaming - #6317

Merged
alexander-alderman-webb merged 6 commits into
masterfrom
webb/litellm/span-first
May 29, 2026
Merged

feat(litellm): Support span streaming#6317
alexander-alderman-webb merged 6 commits into
masterfrom
webb/litellm/span-first

Conversation

@alexander-alderman-webb

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

Copy link
Copy Markdown
Contributor

Description

Use sentry_sdk.traces.start_span and replace Span.set_data() with StreamedSpan.set_attribute() when in span streaming mode.

Parametrize tests on the trace lifecycle option.

Issues

Closes#6034

Reminders

@github-actions

github-actionsBot commented May 21, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

446 passed | Total: 446 | Pass Rate: 100% | Execution Time: 1m 26s

📊 Comparison with Base Branch

MetricChange
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

❌ Patch coverage is 0.00%. Project has 15216 uncovered lines.
❌ Project coverage is 33.5%. Comparing base (base) to head (head).

Files with missing lines (1)
FilePatch %Lines
sentry_sdk/integrations/litellm.py0.00%⚠️ 7 Missing
Coverage diff
@@ Coverage Diff @@## main #PR +/-##
==========================================
- Coverage 34.87% 33.50% -1.37%
==========================================
Files 190 190 —
Lines 22890 22881 -9
Branches 7834 7836 +2
==========================================
+ Hits 7981 7665 -316- Misses 14909 15216 +307- Partials 829 808 -21

Generated by Codecov Action

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review May 21, 2026 11:47
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code ownerMay 21, 2026 11:47
@alexander-alderman-webb
alexander-alderman-webb marked this pull request as draft May 21, 2026 11:48
Comment threadtests/integrations/litellm/test_litellm.py
@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review May 28, 2026 09:06

@ericapisaniericapisani left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Couple of questions, but they're non-blocking

Comment threadsentry_sdk/integrations/litellm.py
Comment threadtests/integrations/litellm/test_litellm.py Outdated
Comment threadtests/integrations/litellm/test_litellm.py Outdated

@cursorcursorBot left a comment

Copy link
Copy Markdown

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 1 potential issue.

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 87d98e2. Configure here.

Comment threadtests/integrations/litellm/test_litellm.py
@alexander-alderman-webb
alexander-alderman-webb merged commit 0749d3e into masterMay 29, 2026
154 of 157 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/litellm/span-first branch May 29, 2026 07:55
mgaligniana pushed a commit to mgaligniana/sentry-python that referenced this pull request Aug 9, 2026
Sign up for freeto 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.

Migrate litellm to span first

2 participants

@alexander-alderman-webb@ericapisani