Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!
Python
fix: Debug logs are not taken into account by OTEL
Clémence Lesné565e12afdc65
diff --git a/helpers/logging.py b/helpers/logging.pyindex 4d96b2d..872f4cc 100644--- a/helpers/logging.py+++ b/helpers/logging.py@@ -1,30 +1,28 @@from azure.monitor.opentelemetry import configure_azure_monitorfrom helpers.config import CONFIG-from logging import Logger, getLogger, basicConfig, StreamHandler+from logging import Logger, getLogger, basicConfigfrom opentelemetry import tracefrom opentelemetry.instrumentation.aiohttp_client import AioHttpClientInstrumentorfrom opentelemetry.instrumentation.httpx import HTTPXClientInstrumentorfrom os import environ+# Logging levels+_LOGGING_APP_LEVEL = CONFIG.monitoring.logging.app_level.value+_LOGGING_SYS_LEVEL = CONFIG.monitoring.logging.sys_level.value+basicConfig(level=_LOGGING_SYS_LEVEL)++# OpenTelemetryenviron["OTEL_TRACES_SAMPLER_ARG"] = str(0.5) # Sample 50% of tracesconfigure_azure_monitor(connection_string=CONFIG.monitoring.application_insights.connection_string.get_secret_value(),) # Configure Azure monitor collection-getLogger("").addHandler(StreamHandler()) # Re-enable logging to stdoutAioHttpClientInstrumentor().instrument() # Instrument aiohttpHTTPXClientInstrumentor().instrument() # Instrument httpx--_LOGGING_APP_LEVEL = CONFIG.monitoring.logging.app_level.value-_LOGGING_SYS_LEVEL = CONFIG.monitoring.logging.sys_level.value--basicConfig(level=_LOGGING_SYS_LEVEL)--# Creates a tracer from the global tracer providerTRACER = trace.get_tracer(instrumenting_library_version=CONFIG.version,instrumenting_module_name="com.github.clemlesne.claim-ai",-)+) # Create a tracer that will be used in the appdef build_logger(name: str) -> Logger: