Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
Fix: HTTPX instrumentation
Clémence Lesnéaf32ec9e0c4c
diff --git a/helpers/logging.py b/helpers/logging.pyindex d781159..497f249 100644--- a/helpers/logging.py+++ b/helpers/logging.py@@ -3,6 +3,7 @@ from helpers.config import CONFIGfrom logging import getLogger, basicConfigfrom opentelemetry import tracefrom opentelemetry.instrumentation.aiohttp_client import AioHttpClientInstrumentor+from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentorfrom os import getenv@@ -18,6 +19,7 @@ configure_azure_monitor(connection_string=getenv("APPLICATIONINSIGHTS_CONNECTION_STRING"),) # Configure Azure Application Insights exporterAioHttpClientInstrumentor().instrument() # Instrument aiohttp+HTTPXClientInstrumentor().instrument() # Instrument httpxtracer = trace.get_tracer(instrumenting_library_version=CONFIG.version,instrumenting_module_name=f"com.github.clemlesne.{APP_NAME}",diff --git a/requirements.txt b/requirements.txtindex a1a9086..7d9a1a4 100644--- a/requirements.txt+++ b/requirements.txt@@ -17,6 +17,7 @@ json-repair==0.20.1mistune==3.0.2openai==1.30.3opentelemetry-instrumentation-aiohttp-client==0.46b0+opentelemetry-instrumentation-httpx==0.46b0opentelemetry-instrumentation-openai==0.21.4opentelemetry-instrumentation-redis==0.46b0opentelemetry-instrumentation-sqlite3==0.46b0