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 24
24
AioHttpServerInstrumentor ,
25
25
)
26
26
from 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
+ )
28
32
from opentelemetry .test .globals_test import reset_trace_globals
29
33
from opentelemetry .test .test_base import TestBase
30
34
from opentelemetry .util ._importlib_metadata import entry_points
@@ -127,15 +131,11 @@ async def test_status_code_instrumentation(
127
131
128
132
[span ] = memory_exporter .get_finished_spans ()
129
133
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 ]
135
136
136
137
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 ]
139
139
)
140
140
141
141
You can’t perform that action at this time.
0 commit comments