Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

ops: Enable native OpenTelemetry Functions Apps integration

Clémence Lesnéee5a2df1ed47
diff --git a/helpers/logging.py b/helpers/logging.py
index 497f249..b8dc0b6 100644
--- a/helpers/logging.py
+++ b/helpers/logging.py
@@ -4,7 +4,6 @@ from logging import getLogger, basicConfig
from opentelemetry import trace
from opentelemetry.instrumentation.aiohttp_client import AioHttpClientInstrumentor
from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor
-from os import getenv
APP_NAME = "call-center-ai"
@@ -15,9 +14,7 @@ logger = getLogger(APP_NAME)
logger.setLevel(CONFIG.monitoring.logging.app_level.value)
# OpenTelemetry
-configure_azure_monitor(
- connection_string=getenv("APPLICATIONINSIGHTS_CONNECTION_STRING"),
-) # Configure Azure Application Insights exporter
+configure_azure_monitor() # Configure Azure Application Insights exporter
AioHttpClientInstrumentor().instrument() # Instrument aiohttp
HTTPXClientInstrumentor().instrument() # Instrument httpx
tracer = trace.get_tracer(
diff --git a/host.json b/host.json
index 6734a88..91ff939 100644
--- a/host.json
+++ b/host.json
@@ -9,8 +9,16 @@
"logLevel": {
"default": "Warning",
"Function": "Information"
+ },
+ "applicationInsights": {
+ "samplingSettings": {
+ "isEnabled": true,
+ "excludedTypes": "Request"
+ },
+ "enableLiveMetricsFilters": true
}
},
+ "telemetryMode": "openTelemetry",
"extensions": {
"http": {
"routePrefix": ""