Skip to content

Commit 008cd8e

Browse files
authored
refac: import fastapi instrumentor directly (open-webui#23530)
1 parent c0ac10d commit 008cd8e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

backend/open_webui/utils/telemetry/instrumentors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
TraceRequestEndParams,
88
TraceRequestExceptionParams,
99
)
10-
from chromadb.telemetry.opentelemetry.fastapi import instrument_fastapi
1110
from fastapi import FastAPI
11+
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
1212
from opentelemetry.instrumentation.httpx import (
1313
HTTPXClientInstrumentor,
1414
RequestInfo,
@@ -176,7 +176,7 @@ def instrumentation_dependencies(self) -> Collection[str]:
176176
return []
177177

178178
def _instrument(self, **kwargs):
179-
instrument_fastapi(app=self.app)
179+
FastAPIInstrumentor.instrument_app(app=self.app)
180180
SQLAlchemyInstrumentor().instrument(engine=self.db_engine)
181181
RedisInstrumentor().instrument(request_hook=redis_request_hook)
182182
RequestsInstrumentor().instrument(request_hook=requests_hook, response_hook=response_hook)

0 commit comments

Comments
 (0)