Skip to content

Commit c60f32a

Browse files
committed
assume port is string
1 parent 8e4584c commit c60f32a

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi

ext/opentelemetry-ext-wsgi/src/opentelemetry/ext/wsgi/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,7 @@ def collect_request_attributes(environ):
100100

101101
host_port = environ.get("SERVER_PORT")
102102
if host_port is not None:
103-
if isinstance(host_port, str):
104-
host_port = int(host_port)
105-
result.update({"host.port": host_port})
103+
result.update({"host.port": int(host_port)})
106104

107105
setifnotnone(result, "http.host", environ.get("HTTP_HOST"))
108106
target = environ.get("RAW_URI")

0 commit comments

Comments
 (0)