feat(litellm): Support span streaming#6317
Conversation
Codecov Results 📊✅ 85 passed | ❌ 74 failed | Total: 159 | Pass Rate: 53.46% | Execution Time: 2m 11s ❌ Failed Tests
|
| File | Patch % | Lines |
|---|---|---|
tracing_utils.py |
33.29% | |
litellm.py |
88.89% |
Generated by Codecov Action
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 49ec553. Configure here.
| events = [item.payload for item in items if item.type == "transaction"] | ||
| assert len(events) == 3 | ||
|
|
||
| sentry_sdk.flush() |
There was a problem hiding this comment.
Sync test captures only transactions, missing span validation
Medium Severity
In the sync test_multiple_providers, capture_items("transaction") only captures transaction-type items. The newly added sentry_sdk.flush() before spans = [item.payload for item in items if item.type == "span"] suggests an intent to capture and validate spans, but the filter at capture time excludes them. This makes the span assertions in the for loop vacuously true — they never execute. The async counterpart test_async_multiple_providers correctly uses capture_items("transaction", "span"), confirming this is an oversight.
Reviewed by Cursor Bugbot for commit 49ec553. Configure here.


Description
Use
sentry_sdk.traces.start_spanand replaceSpan.set_data()withStreamedSpan.set_attribute()when in span streaming mode.Parametrize tests on the trace lifecycle option.
Issues
Reminders
tox -e linters.feat:,fix:,ref:,meta:)