@@ -109,7 +109,7 @@ def validate_response(
109
109
"component" : "http" ,
110
110
"http.server_name" : "127.0.0.1" ,
111
111
"http.scheme" : "http" ,
112
- "host.port" : 80 ,
112
+ "net. host.port" : 80 ,
113
113
"http.host" : "127.0.0.1" ,
114
114
"http.flavor" : "1.0" ,
115
115
"http.url" : "http://127.0.0.1/" ,
@@ -219,7 +219,7 @@ def test_request_attributes(self):
219
219
"http.method" : "GET" ,
220
220
"http.host" : "127.0.0.1" ,
221
221
"http.url" : "http://127.0.0.1/?foo=bar" ,
222
- "host.port" : 80 ,
222
+ "net. host.port" : 80 ,
223
223
"http.scheme" : "http" ,
224
224
"http.server_name" : "127.0.0.1" ,
225
225
"http.flavor" : "1.0" ,
@@ -230,7 +230,8 @@ def validate_url(self, expected_url, raw=False, has_host=True):
230
230
parts = urlsplit (expected_url )
231
231
expected = {
232
232
"http.scheme" : parts .scheme ,
233
- "host.port" : parts .port or (80 if parts .scheme == "http" else 443 ),
233
+ "net.host.port" : parts .port
234
+ or (80 if parts .scheme == "http" else 443 ),
234
235
"http.server_name" : parts .hostname , # Not true in the general case, but for all tests.
235
236
}
236
237
if raw :
@@ -296,7 +297,7 @@ def test_request_attributes_with_conflicting_nonstandard_port(self):
296
297
expected = {
297
298
"http.host" : "127.0.0.1:8080" ,
298
299
"http.url" : "http://127.0.0.1:8080/" ,
299
- "host.port" : 80 ,
300
+ "net. host.port" : 80 ,
300
301
}
301
302
self .assertGreaterEqual (
302
303
otel_wsgi .collect_request_attributes (self .environ ).items (),
0 commit comments