File tree 1 file changed +9
-1
lines changed
instrumentation/opentelemetry-instrumentation-fastapi/tests
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 20
20
21
21
import fastapi
22
22
from fastapi .middleware .httpsredirect import HTTPSRedirectMiddleware
23
+ from fastapi .responses import JSONResponse
23
24
from fastapi .testclient import TestClient
24
25
25
26
import opentelemetry .instrumentation .fastapi as otel_fastapi
27
+ from opentelemetry import trace
26
28
from opentelemetry .instrumentation ._semconv import (
27
29
OTEL_SEMCONV_STABILITY_OPT_IN ,
28
30
_OpenTelemetrySemanticConventionStability ,
47
49
)
48
50
from opentelemetry .semconv .attributes .url_attributes import URL_SCHEME
49
51
from opentelemetry .semconv .trace import SpanAttributes
52
+ from opentelemetry .test .globals_test import reset_trace_globals
50
53
from opentelemetry .test .test_base import TestBase
51
- from opentelemetry .util .http import get_excluded_urls
54
+ from opentelemetry .util .http import (
55
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS ,
56
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST ,
57
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE ,
58
+ get_excluded_urls ,
59
+ )
52
60
53
61
_expected_metric_names_old = [
54
62
"http.server.active_requests" ,
You can’t perform that action at this time.
0 commit comments