File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import logging
22from logging import Logger
33
4- from azure .identity import ManagedIdentityCredential
4+ # from azure.identity import ManagedIdentityCredential
55from azure .monitor .opentelemetry .exporter import AzureMonitorTraceExporter
66from fastapi import FastAPI
77from fastapp .core .config import settings
@@ -36,9 +36,10 @@ def setup_tracer(app: FastAPI):
3636 RETURNS (None): Nothing is being returned.
3737 """
3838 if settings .APPLICATIONINSIGHTS_CONNECTION_STRING :
39- credential = ManagedIdentityCredential ()
39+ # credential = ManagedIdentityCredential()
4040 exporter = AzureMonitorTraceExporter .from_connection_string (
41- settings .APPLICATIONINSIGHTS_CONNECTION_STRING , credential = credential
41+ settings .APPLICATIONINSIGHTS_CONNECTION_STRING ,
42+ # credential=credential
4243 )
4344 tracer = TracerProvider (resource = Resource ({SERVICE_NAME : "api" }))
4445 tracer .add_span_processor (BatchSpanProcessor (exporter ))
Original file line number Diff line number Diff line change 22# The Python Worker is managed by Azure Functions platform
33# Manually managing azure-functions-worker may cause unexpected issues
44
5- azure-identity ~= 1.13.0
5+ # azure-identity~=1.13.0
66azure-functions ~= 1.14.0
77fastapi ~= 0.96.1
88aiohttp ~= 3.8.4
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ resource "azurerm_application_insights" "application_insights" {
1010 force_customer_storage_for_profiler = false
1111 internet_ingestion_enabled = true
1212 internet_query_enabled = true
13- local_authentication_disabled = true
13+ local_authentication_disabled = false
1414 retention_in_days = 90
1515 sampling_percentage = 100
1616 workspace_id = azurerm_log_analytics_workspace. log_analytics_workspace . id
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ resource "azurerm_role_assignment" "function_role_assignment_key_vault" {
1010 principal_id = azapi_resource. function . identity [0 ]. principal_id
1111}
1212
13- resource "azurerm_role_assignment" "function_role_assignment_application_insights" {
14- scope = azurerm_application_insights. application_insights . id
15- role_definition_name = " Monitoring Metrics Publisher"
16- principal_id = azapi_resource. function . identity [0 ]. principal_id
17- }
13+ # resource "azurerm_role_assignment" "function_role_assignment_application_insights" {
14+ # scope = azurerm_application_insights.application_insights.id
15+ # role_definition_name = "Monitoring Metrics Publisher"
16+ # principal_id = azapi_resource.function.identity[0].principal_id
17+ # }
You can’t perform that action at this time.
0 commit comments