File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 25
25
from fastapi .routing import _merge_lifespan_context
26
26
27
27
if import_checker .is_opentelemetry_installed :
28
- from opentelemetry .instrumentation .fastapi import FastAPIInstrumentor
29
28
from opentelemetry .trace import get_tracer_provider
30
29
30
+ if import_checker .is_fastapi_opentelemetry_installed :
31
+ from opentelemetry .instrumentation .fastapi import FastAPIInstrumentor
32
+
31
33
if import_checker .is_prometheus_fastapi_instrumentator_installed :
32
34
from prometheus_fastapi_instrumentator import Instrumentator
33
35
Original file line number Diff line number Diff line change 9
9
is_litestar_installed = find_spec ("litestar" ) is not None
10
10
is_faststream_installed = find_spec ("faststream" ) is not None
11
11
is_prometheus_fastapi_instrumentator_installed = find_spec ("prometheus_fastapi_instrumentator" ) is not None
12
+ is_fastapi_opentelemetry_installed = find_spec ("opentelemetry.instrumentation.fastapi" ) is not None
You can’t perform that action at this time.
0 commit comments