feat: add otel system metrics instrumentation (#22265)

This commit is contained in:
Shamil
2026-03-06 14:24:24 -06:00
committed by GitHub
parent 1c1c1c3100
commit 9cf6108527
2 changed files with 3 additions and 0 deletions
@@ -20,6 +20,7 @@ from opentelemetry.instrumentation.redis import RedisInstrumentor
from opentelemetry.instrumentation.requests import RequestsInstrumentor
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
from opentelemetry.instrumentation.aiohttp_client import AioHttpClientInstrumentor
from opentelemetry.instrumentation.system_metrics import SystemMetricsInstrumentor
from opentelemetry.trace import Span, StatusCode
from redis import Redis
from redis.cluster import RedisCluster
@@ -204,6 +205,7 @@ class Instrumentor(BaseInstrumentor):
request_hook=aiohttp_request_hook,
response_hook=aiohttp_response_hook,
)
SystemMetricsInstrumentor().instrument()
def _uninstrument(self, **kwargs):
if getattr(self, "instrumentors", None) is None:
+1
View File
@@ -155,3 +155,4 @@ opentelemetry-instrumentation-requests==0.60b1
opentelemetry-instrumentation-logging==0.60b1
opentelemetry-instrumentation-httpx==0.60b1
opentelemetry-instrumentation-aiohttp-client==0.60b1
opentelemetry-instrumentation-system-metrics==0.60b1