Skip to content

Commit 4b5df10

Browse files
committed
Renames
1 parent a8295c5 commit 4b5df10

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

sentry_sdk/integrations/fastapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from sentry_sdk.integrations.starlette import (
2121
StarletteIntegration,
2222
StarletteRequestExtractor,
23-
_set_body_data_on_streaming_segment,
23+
_set_request_body_data_on_streaming_segment,
2424
)
2525
except DidNotEnable:
2626
raise DidNotEnable("Starlette is not installed")
@@ -141,7 +141,7 @@ def event_processor(event: "Event", hint: "Dict[str, Any]") -> "Event":
141141
)
142142

143143
if has_span_streaming_enabled(client.options):
144-
_set_body_data_on_streaming_segment(info)
144+
_set_request_body_data_on_streaming_segment(info)
145145

146146
return await old_app(*args, **kwargs)
147147

sentry_sdk/integrations/starlette.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ async def _sentry_send(*args: "Any", **kwargs: "Any") -> "Any":
234234
return middleware_class
235235

236236

237-
def _serialize_body_data(data: "Any") -> str:
237+
def _serialize_request_body_data(data: "Any") -> str:
238238
# data may be a JSON-serializable value, an AnnotatedValue, or a dict with AnnotatedValue values
239239
def _default(value: "Any") -> "Any":
240240
if isinstance(value, AnnotatedValue):
@@ -244,7 +244,7 @@ def _default(value: "Any") -> "Any":
244244
return json.dumps(data, default=_default)
245245

246246

247-
def _set_body_data_on_streaming_segment(
247+
def _set_request_body_data_on_streaming_segment(
248248
info: "Optional[Dict[str, Any]]",
249249
) -> None:
250250
current_span = sentry_sdk.get_current_span()
@@ -256,7 +256,7 @@ def _set_body_data_on_streaming_segment(
256256
):
257257
current_span._segment.set_attribute(
258258
"http.request.body.data",
259-
_serialize_body_data(info["data"]),
259+
_serialize_request_body_data(info["data"]),
260260
)
261261

262262

@@ -527,7 +527,7 @@ def event_processor(
527527
)
528528

529529
if has_span_streaming_enabled(client.options):
530-
_set_body_data_on_streaming_segment(info)
530+
_set_request_body_data_on_streaming_segment(info)
531531

532532
return await old_func(*args, **kwargs)
533533

0 commit comments

Comments
 (0)