fix(api): Only emit API mismatch warnings when client is active#6520
Merged
sentrivana merged 2 commits intoJun 8, 2026
Merged
Conversation
alexander-alderman-webb
approved these changes
Jun 8, 2026
Contributor
Codecov Results 📊✅ 88776 passed | ⏭️ 6025 skipped | Total: 94801 | Pass Rate: 93.64% | Execution Time: 297m 5s 📊 Comparison with Base Branch
➖ Removed Tests (10)View removed tests
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2362 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 89.87% 89.87% —%
==========================================
Files 192 192 —
Lines 23320 23321 +1
Branches 8020 8020 —
==========================================
+ Hits 20958 20959 +1
- Misses 2362 2362 —
- Partials 1327 1327 —Generated by Codecov Action |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When working on the dogfooding branch in Sentry, I've seen warnings emitted about using span streaming API in non streaming mode when that was not the case. The problem is that when the SDK has not been
init-ed yet and you use e.g. the new streaming@tracedecorator,has_span_streaming_enabled()will returnFalseand it'll appear as though you're using the streaming API in non-streaming mode.Check whether the SDK/client has actually been initialized before emitting any warnings.
Issues
Reminders
uv run ruff.feat:,fix:,ref:,meta:)