Skip to content

Commit 46142e4

Browse files
feat(python): Document disabled-by-default middleware spans (#15923)
The `middleware_spans` option was missing from the FastAPI documentation. Adjust working to clarify that the option gates creating one span per middleware layer. Documents getsentry/sentry-python#5219 and getsentry/sentry-python#5224.
1 parent aa19b06 commit 46142e4

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

docs/platforms/python/integrations/django/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ You can pass the following keyword arguments to `DjangoIntegration()`:
151151

152152
- `middleware_spans`:
153153

154-
Create spans and track performance of all middleware in your Django project. Set to `False` to disable.
154+
Create spans and track performance of all middleware layers in your Django project. Set to `True` to enable.
155155

156156
The default is `False`.
157157

docs/platforms/python/integrations/fastapi/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ You can pass the following keyword arguments to `StarletteIntegration()` and `Fa
161161

162162
The default is `{*range(500, 600)}`, meaning that all 5xx status codes are reported to Sentry.
163163

164+
- `middleware_spans`:
165+
166+
Create spans and track performance of all middleware layers in your FastAPI project. Set to `True` to enable.
167+
168+
The default is `False`.
169+
164170
- `http_methods_to_capture`:
165171

166172
A tuple containing all the HTTP methods that should create a transaction in Sentry.

docs/platforms/python/integrations/starlette/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ You can pass the following keyword arguments to `StarletteIntegration()`:
108108

109109
- `middleware_spans`:
110110

111-
Create spans and track performance of all middleware in your Starlette project. Set to `False` to disable.
111+
Create spans and track performance of all middleware layers in your Starlette project. Set to `True` to enable.
112112

113-
The default is `True`.
113+
The default is `False`.
114114

115115
- `http_methods_to_capture`:
116116

0 commit comments

Comments
 (0)