diff --git a/infra/main.bicep b/infra/main.bicep index a029af2c..6a0381a9 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -234,8 +234,8 @@ module logAnalyticsWorkspace 'br/public:avm/res/operational-insights/workspace:0 } : null // WAF aligned configuration for Private Networking - publicNetworkAccessForIngestion: enablePrivateNetworking ? 'Disabled' : 'Enabled' - publicNetworkAccessForQuery: enablePrivateNetworking ? 'Disabled' : 'Enabled' + publicNetworkAccessForIngestion: 'Enabled' + publicNetworkAccessForQuery: 'Enabled' dataSources: enablePrivateNetworking ? [ { @@ -291,7 +291,7 @@ module applicationInsights 'br/public:avm/res/insights/component:0.7.0' = if (en retentionInDays: 365 kind: 'web' disableIpMasking: false - disableLocalAuth: true + disableLocalAuth: false flowType: 'Bluefield' } } diff --git a/src/backend/api/api_routes.py b/src/backend/api/api_routes.py index e3c6a372..008e3f13 100644 --- a/src/backend/api/api_routes.py +++ b/src/backend/api/api_routes.py @@ -15,7 +15,7 @@ # Third-party # Azure Monitor OpenTelemetry integration is currently causing issues with OpenAI calls in process_batch_async, needs further investigation, commenting out for now -# from azure.monitor.opentelemetry import configure_azure_monitor +from azure.monitor.opentelemetry import configure_azure_monitor from common.logger.app_logger import AppLogger from common.services.batch_service import BatchService @@ -44,8 +44,12 @@ instrumentation_key = os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING") if instrumentation_key: # Configure Application Insights if the Instrumentation Key is found - # commenting below line as configure_azure_monitor is causing issues with OpenAI calls in process_batch_async, needs further investigation - # configure_azure_monitor(connection_string=instrumentation_key) + configure_azure_monitor( + connection_string=instrumentation_key, + instrumentation_options={ + "azure_sdk": {"enabled": False}, + } + ) logging.info( "Application Insights configured with the provided Instrumentation Key" )