Skip to content

Commit f4bcaa8

Browse files
committed
Fix test case
1 parent 813d737 commit f4bcaa8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020

2121
import fastapi
2222
from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware
23+
from fastapi.responses import JSONResponse
2324
from fastapi.testclient import TestClient
2425

2526
import opentelemetry.instrumentation.fastapi as otel_fastapi
27+
from opentelemetry import trace
2628
from opentelemetry.instrumentation._semconv import (
2729
OTEL_SEMCONV_STABILITY_OPT_IN,
2830
_OpenTelemetrySemanticConventionStability,
@@ -47,8 +49,14 @@
4749
)
4850
from opentelemetry.semconv.attributes.url_attributes import URL_SCHEME
4951
from opentelemetry.semconv.trace import SpanAttributes
52+
from opentelemetry.test.globals_test import reset_trace_globals
5053
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+
)
5260

5361
_expected_metric_names_old = [
5462
"http.server.active_requests",

0 commit comments

Comments
 (0)