File tree Expand file tree Collapse file tree
open_webui/utils/telemetry Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020from opentelemetry .instrumentation .requests import RequestsInstrumentor
2121from opentelemetry .instrumentation .sqlalchemy import SQLAlchemyInstrumentor
2222from opentelemetry .instrumentation .aiohttp_client import AioHttpClientInstrumentor
23+ from opentelemetry .instrumentation .system_metrics import SystemMetricsInstrumentor
2324from opentelemetry .trace import Span , StatusCode
2425from redis import Redis
2526from redis .cluster import RedisCluster
@@ -204,6 +205,7 @@ def _instrument(self, **kwargs):
204205 request_hook = aiohttp_request_hook ,
205206 response_hook = aiohttp_response_hook ,
206207 )
208+ SystemMetricsInstrumentor ().instrument ()
207209
208210 def _uninstrument (self , ** kwargs ):
209211 if getattr (self , "instrumentors" , None ) is None :
Original file line number Diff line number Diff line change @@ -155,3 +155,4 @@ opentelemetry-instrumentation-requests==0.60b1
155155opentelemetry-instrumentation-logging == 0.60b1
156156opentelemetry-instrumentation-httpx == 0.60b1
157157opentelemetry-instrumentation-aiohttp-client == 0.60b1
158+ opentelemetry-instrumentation-system-metrics == 0.60b1
You can’t perform that action at this time.
0 commit comments