58
58
SERVER_PORT ,
59
59
)
60
60
from opentelemetry .semconv .attributes .url_attributes import (
61
- URL_FULL ,
62
61
URL_PATH ,
63
62
URL_QUERY ,
64
63
URL_SCHEME ,
@@ -410,7 +409,6 @@ def validate_outputs(
410
409
SERVER_ADDRESS : "127.0.0.1" ,
411
410
NETWORK_PROTOCOL_VERSION : "1.0" ,
412
411
URL_PATH : "/" ,
413
- URL_FULL : "http://127.0.0.1/" ,
414
412
CLIENT_ADDRESS : "127.0.0.1" ,
415
413
CLIENT_PORT : 32767 ,
416
414
HTTP_RESPONSE_STATUS_CODE : 200 ,
@@ -447,7 +445,6 @@ def validate_outputs(
447
445
SERVER_ADDRESS : "127.0.0.1" ,
448
446
NETWORK_PROTOCOL_VERSION : "1.0" ,
449
447
URL_PATH : "/" ,
450
- URL_FULL : "http://127.0.0.1/" ,
451
448
CLIENT_ADDRESS : "127.0.0.1" ,
452
449
CLIENT_PORT : 32767 ,
453
450
HTTP_RESPONSE_STATUS_CODE : 200 ,
@@ -693,7 +690,6 @@ def update_expected_server(expected):
693
690
{
694
691
SERVER_ADDRESS : "0.0.0.0" ,
695
692
SERVER_PORT : 80 ,
696
- URL_FULL : "http://0.0.0.0/" ,
697
693
}
698
694
)
699
695
return expected
@@ -721,7 +717,6 @@ def update_expected_server(expected):
721
717
SpanAttributes .HTTP_URL : "http://0.0.0.0/" ,
722
718
SERVER_ADDRESS : "0.0.0.0" ,
723
719
SERVER_PORT : 80 ,
724
- URL_FULL : "http://0.0.0.0/" ,
725
720
}
726
721
)
727
722
return expected
@@ -1009,7 +1004,6 @@ def test_websocket_new_semconv(self):
1009
1004
SERVER_ADDRESS : self .scope ["server" ][0 ],
1010
1005
NETWORK_PROTOCOL_VERSION : self .scope ["http_version" ],
1011
1006
URL_PATH : self .scope ["path" ],
1012
- URL_FULL : f'{ self .scope ["scheme" ]} ://{ self .scope ["server" ][0 ]} { self .scope ["path" ]} ' ,
1013
1007
CLIENT_ADDRESS : self .scope ["client" ][0 ],
1014
1008
CLIENT_PORT : self .scope ["client" ][1 ],
1015
1009
HTTP_RESPONSE_STATUS_CODE : 200 ,
@@ -1095,7 +1089,6 @@ def test_websocket_both_semconv(self):
1095
1089
SERVER_ADDRESS : self .scope ["server" ][0 ],
1096
1090
NETWORK_PROTOCOL_VERSION : self .scope ["http_version" ],
1097
1091
URL_PATH : self .scope ["path" ],
1098
- URL_FULL : f'{ self .scope ["scheme" ]} ://{ self .scope ["server" ][0 ]} { self .scope ["path" ]} ' ,
1099
1092
CLIENT_ADDRESS : self .scope ["client" ][0 ],
1100
1093
CLIENT_PORT : self .scope ["client" ][1 ],
1101
1094
HTTP_RESPONSE_STATUS_CODE : 200 ,
@@ -1639,7 +1632,6 @@ def test_request_attributes_new_semconv(self):
1639
1632
SERVER_ADDRESS : "127.0.0.1" ,
1640
1633
URL_PATH : "/" ,
1641
1634
URL_QUERY : "foo=bar" ,
1642
- URL_FULL : "http://127.0.0.1/?foo=bar" ,
1643
1635
SERVER_PORT : 80 ,
1644
1636
URL_SCHEME : "http" ,
1645
1637
NETWORK_PROTOCOL_VERSION : "1.0" ,
@@ -1676,7 +1668,6 @@ def test_request_attributes_both_semconv(self):
1676
1668
SERVER_ADDRESS : "127.0.0.1" ,
1677
1669
URL_PATH : "/" ,
1678
1670
URL_QUERY : "foo=bar" ,
1679
- URL_FULL : "http://127.0.0.1/?foo=bar" ,
1680
1671
SERVER_PORT : 80 ,
1681
1672
URL_SCHEME : "http" ,
1682
1673
NETWORK_PROTOCOL_VERSION : "1.0" ,
@@ -1698,18 +1689,24 @@ def test_query_string_new_semconv(self):
1698
1689
self .scope ,
1699
1690
_HTTPStabilityMode .HTTP ,
1700
1691
)
1701
- self .assertEqual (attrs [URL_FULL ], "http://127.0.0.1/?foo=bar" )
1692
+ self .assertEqual (attrs [URL_SCHEME ], "http" )
1693
+ self .assertEqual (attrs [SERVER_ADDRESS ], "127.0.0.1" )
1694
+ self .assertEqual (attrs [URL_PATH ], "/" )
1695
+ self .assertEqual (attrs [URL_QUERY ], "foo=bar" )
1702
1696
1703
1697
def test_query_string_both_semconv (self ):
1704
1698
self .scope ["query_string" ] = b"foo=bar"
1705
1699
attrs = otel_asgi .collect_request_attributes (
1706
1700
self .scope ,
1707
1701
_HTTPStabilityMode .HTTP_DUP ,
1708
1702
)
1709
- self .assertEqual (attrs [URL_FULL ], "http://127.0.0.1/?foo=bar" )
1710
1703
self .assertEqual (
1711
1704
attrs [SpanAttributes .HTTP_URL ], "http://127.0.0.1/?foo=bar"
1712
1705
)
1706
+ self .assertEqual (attrs [URL_SCHEME ], "http" )
1707
+ self .assertEqual (attrs [SERVER_ADDRESS ], "127.0.0.1" )
1708
+ self .assertEqual (attrs [URL_PATH ], "/" )
1709
+ self .assertEqual (attrs [URL_QUERY ], "foo=bar" )
1713
1710
1714
1711
def test_query_string_percent_bytes (self ):
1715
1712
self .scope ["query_string" ] = b"foo%3Dbar"
0 commit comments