feat(types): Export SpanJSON type - #7331
Merged
Merged
Conversation
Fixes PY-2759 Fixes #7330
ericapisani
added a commit
to getsentry/testing-sentry-python
that referenced
this pull request
Sep 1, 2026
Uses the SpanJSON type now exported from sentry_sdk.types by getsentry/sentry-python#7331, replacing the dict[str, Any] placeholder and the comment explaining why no public span type was available. Verified with mypy against the local sentry-python checkout: SpanJSON resolves to the real TypedDict (not Any) and invalid keys are rejected.
ericapisani
added a commit
to getsentry/testing-sentry-python
that referenced
this pull request
Sep 1, 2026
* feat(test-callback-typing): Enable span streaming Turn on top-level trace_lifecycle="stream" and swap the before_send_transaction callback for before_send_span, matching the new streamed-span callback API. Bump the sentry-sdk dependency floor to >=2.68.1, the version that introduced trace_lifecycle. * ref(test-callback-typing): Type before_send_span with public SpanJSON Uses the SpanJSON type now exported from sentry_sdk.types by getsentry/sentry-python#7331, replacing the dict[str, Any] placeholder and the comment explaining why no public span type was available. Verified with mypy against the local sentry-python checkout: SpanJSON resolves to the real TypedDict (not Any) and invalid keys are rejected.
Contributor
Codecov Results πβ 125599 passed | βοΈ 6763 skipped | Total: 132362 | Pass Rate: 94.89% | Execution Time: 455m 47s π Comparison with Base Branch
β Removed Tests (4)View removed tests
All tests are passing successfully. β
Patch coverage is 100.00%. Project has 2496 uncovered lines. Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 90.27% 90.27% β%
==========================================
Files 193 193 β
Lines 25649 25650 +1
Branches 9454 9454 β
==========================================
+ Hits 23153 23154 +1
- Misses 2496 2496 β
- Partials 1443 1443 βGenerated by Codecov Action |
sentrivana
approved these changes
Sep 2, 2026
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.
Fixes PY-2759
Fixes #7330