Skip to content

Commit e2484bd

Browse files
committed
fixes
1 parent 282ba35 commit e2484bd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sentry_sdk/integrations/_asgi_common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,6 @@ def _get_request_attributes(asgi_scope: "Any") -> "dict[str, Any]":
132132

133133
client = asgi_scope.get("client")
134134
if client and should_send_default_pii():
135-
attributes["client.address"] = {"REMOTE_ADDR": _get_ip(asgi_scope)}
135+
attributes["client.address"] = _get_ip(asgi_scope)
136136

137137
return attributes

sentry_sdk/integrations/asgi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ async def _run_app(
307307
else nullcontext()
308308
)
309309

310-
for attribute, value in _get_request_attributes(scope):
310+
for attribute, value in _get_request_attributes(scope).items():
311311
sentry_scope.set_attribute(attribute, value)
312312

313313
with span_ctx as span:
@@ -449,7 +449,7 @@ def _get_segment_name_and_source(
449449
self: "SentryAsgiMiddleware", segment_style: str, asgi_scope: "Any"
450450
) -> "Tuple[str, str]":
451451
name = None
452-
source = SEGMENT_SOURCE_FOR_STYLE[segment_style]
452+
source = SEGMENT_SOURCE_FOR_STYLE[segment_style].value
453453
ty = asgi_scope.get("type")
454454

455455
if segment_style == "endpoint":

0 commit comments

Comments
 (0)