File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
instrumentation/opentelemetry-instrumentation-aiohttp-server/tests Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 2424 AioHttpServerInstrumentor ,
2525)
2626from opentelemetry .instrumentation .utils import suppress_http_instrumentation
27- from opentelemetry .semconv .trace import SpanAttributes
27+ from opentelemetry .semconv ._incubating .attributes .http_attributes import (
28+ HTTP_METHOD ,
29+ HTTP_STATUS_CODE ,
30+ HTTP_URL ,
31+ )
2832from opentelemetry .test .globals_test import reset_trace_globals
2933from opentelemetry .test .test_base import TestBase
3034from opentelemetry .util ._importlib_metadata import entry_points
@@ -127,15 +131,11 @@ async def test_status_code_instrumentation(
127131
128132 [span ] = memory_exporter .get_finished_spans ()
129133
130- assert expected_method .value == span .attributes [SpanAttributes .HTTP_METHOD ]
131- assert (
132- expected_status_code
133- == span .attributes [SpanAttributes .HTTP_STATUS_CODE ]
134- )
134+ assert expected_method .value == span .attributes [HTTP_METHOD ]
135+ assert expected_status_code == span .attributes [HTTP_STATUS_CODE ]
135136
136137 assert (
137- f"http://{ server .host } :{ server .port } { url } "
138- == span .attributes [SpanAttributes .HTTP_URL ]
138+ f"http://{ server .host } :{ server .port } { url } " == span .attributes [HTTP_URL ]
139139 )
140140
141141
You can’t perform that action at this time.
0 commit comments