fix(starlette): Stop duplicating scope["root_path"] in URLs#6579
1 issue
find-bugs: Found 1 issue (1 medium)
Medium
`url.full` assertion fails without `send_default_pii=True` - `tests/integrations/litestar/test_litestar.py:854-856`
The span_streaming=True branch asserts server_span["attributes"]["url.full"], but _get_request_attributes only sets url.full when should_send_default_pii() is True. Without send_default_pii=True in sentry_init, this will always raise a KeyError.
Also found at:
tests/integrations/starlite/test_starlite.py:586-592
⏱ 22m 52s · 5.7M in / 199.7k out · $6.91
Annotations
Check warning on line 856 in tests/integrations/litestar/test_litestar.py
sentry-warden / warden: find-bugs
`url.full` assertion fails without `send_default_pii=True`
The `span_streaming=True` branch asserts `server_span["attributes"]["url.full"]`, but `_get_request_attributes` only sets `url.full` when `should_send_default_pii()` is `True`. Without `send_default_pii=True` in `sentry_init`, this will always raise a `KeyError`.
Check warning on line 592 in tests/integrations/starlite/test_starlite.py
sentry-warden / warden: find-bugs
[MCJ-K3L] `url.full` assertion fails without `send_default_pii=True` (additional location)
The `span_streaming=True` branch asserts `server_span["attributes"]["url.full"]`, but `_get_request_attributes` only sets `url.full` when `should_send_default_pii()` is `True`. Without `send_default_pii=True` in `sentry_init`, this will always raise a `KeyError`.