feat(fastapi): Add http.route attribute - #7322
Draft
alexander-alderman-webb wants to merge 5 commits into
Draft
Conversation
Contributor
Codecov Results 📊✅ 121236 passed | ❌ 2 failed | ⏭️ 6762 skipped | Total: 128000 | Pass Rate: 94.72% | Execution Time: 429m 51s 📊 Comparison with Base Branch
➕ New Tests (2)View new tests
❌ Failed Tests
|
| File | Patch % | Lines |
|---|---|---|
| sentry_sdk/integrations/asgi.py | 50.00% |
Coverage diff
@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 90.29% 90.28% -0.01%
==========================================
Files 193 193 —
Lines 25621 25630 +9
Branches 9438 9440 +2
==========================================
+ Hits 23132 23138 +6
- Misses 2489 2492 +3
- Partials 1436 1438 +2Generated 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
Add the
_server_segment_spanfield on theScopeclass so HTTP framework integrations have a reference to the server span. In this case, the reference is used to set the parametrized route as thehttp.routeattribute.Generically setting the current segment on the
Scopeis not enough to always have a reference to the server segment span.The user can start a new segment in the same trace by calling
traces.start_span(parent_span=None).Issues
Reminders
uv run ruff.feat:,fix:,ref:,meta:)