Skip to content

Commit b420587

Browse files
update docstrings
1 parent 518acbe commit b420587

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

sentry_sdk/integrations/litestar.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ def __init__(
9292
mechanism_type="asgi",
9393
span_origin=span_origin,
9494
asgi_version=3,
95-
# https://github.com/litestar-org/litestar/issues/2077
95+
# Unlike Starlette, LiteStar does not extend scope["root_path"] with the mount path.
96+
# Since LiteStar handles servers that include and do not include scope["root_path"] in scope["path"]
97+
# with the commit below, keep the existing behavior for compatibility.
98+
# https://github.com/litestar-org/litestar/commit/72dda171768bd470adc065c47c1ecf1d80b5e749
9699
path_includes_root_path=False,
97100
)
98101

sentry_sdk/integrations/quart.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ async def sentry_patched_asgi_app(
102102
lambda *a, **kw: old_app(self, *a, **kw),
103103
span_origin=QuartIntegration.origin,
104104
asgi_version=3,
105+
# Starting with the commit below, Quart treats any scope["path"]
106+
# that does not include scope["root_path"] as invalid.
105107
# https://github.com/pallets/quart/commit/7be545c
106108
path_includes_root_path=version >= (0, 19),
107109
)

sentry_sdk/integrations/starlette.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ def setup_once() -> None:
143143
)
144144

145145
patch_middlewares()
146-
# See https://github.com/Kludex/starlette/commit/e8f0dcd54e4ceec47e02c45f5275374e292339ad
146+
# Starlette's Mount includes scope["root_path"] in scope["path"] starting with:
147+
# https://github.com/Kludex/starlette/commit/e8f0dcd54e4ceec47e02c45f5275374e292339ad.
147148
path_includes_root_path = version >= (0, 33)
148149
patch_asgi_app(path_includes_root_path=path_includes_root_path)
149150
patch_request_response()

sentry_sdk/integrations/starlite.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ def __init__(
7777
mechanism_type="asgi",
7878
span_origin=span_origin,
7979
asgi_version=3,
80-
# https://github.com/litestar-org/litestar/issues/2077
8180
path_includes_root_path=False,
8281
)
8382

0 commit comments

Comments
 (0)