ref(pydantic-ai): Adopt shared span-data helper for dual span APIs - #7193
Draft
ericapisani wants to merge 1 commit into
Draft
ref(pydantic-ai): Adopt shared span-data helper for dual span APIs#7193ericapisani wants to merge 1 commit into
ericapisani wants to merge 1 commit into
Conversation
Replace the ten hand-rolled set_attribute/set_data dispatch branches with the existing sentry_sdk.ai.utils._set_span_data_attribute helper already used by the MCP and Hugging Face Hub integrations. Also guard gen_ai.response.model against a None model_name (previously masked by a type-ignore) and move now annotation-only StreamedSpan imports under TYPE_CHECKING.
Contributor
Codecov Results 📊✅ 112463 passed | ⏭️ 6759 skipped | Total: 119222 | Pass Rate: 94.33% | Execution Time: 401m 4s 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2478 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 90.23% 90.22% -0.01%
==========================================
Files 193 193 —
Lines 25361 25344 -17
Branches 9302 9294 -8
==========================================
+ Hits 22883 22866 -17
- Misses 2478 2478 —
- Partials 1432 1433 +1Generated by Codecov Action |
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
Issues
Reminders
uv run ruff.feat:,fix:,ref:,meta:)Stack created with GitHub Stacks CLI • Give Feedback 💬