Skip to content

Commit 94532f6

Browse files
committed
set server.port as int
1 parent 54064a5 commit 94532f6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sentry_sdk/integrations/wsgi.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,10 @@ def _get_request_attributes(
420420

421421
server_port = environ.get("SERVER_PORT")
422422
if server_port:
423-
attributes["server.port"] = server_port
423+
try:
424+
attributes["server.port"] = int(server_port)
425+
except ValueError:
426+
pass
424427

425428
if should_send_default_pii():
426429
client_ip = get_client_ip(environ)

0 commit comments

Comments
 (0)