File tree Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Expand file tree Collapse file tree 4 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 1
1
import logging
2
2
from logging import Logger
3
3
4
- from azure .identity import ManagedIdentityCredential
4
+ # from azure.identity import ManagedIdentityCredential
5
5
from azure .monitor .opentelemetry .exporter import AzureMonitorTraceExporter
6
6
from fastapi import FastAPI
7
7
from fastapp .core .config import settings
@@ -36,9 +36,10 @@ def setup_tracer(app: FastAPI):
36
36
RETURNS (None): Nothing is being returned.
37
37
"""
38
38
if settings .APPLICATIONINSIGHTS_CONNECTION_STRING :
39
- credential = ManagedIdentityCredential ()
39
+ # credential = ManagedIdentityCredential()
40
40
exporter = AzureMonitorTraceExporter .from_connection_string (
41
- settings .APPLICATIONINSIGHTS_CONNECTION_STRING , credential = credential
41
+ settings .APPLICATIONINSIGHTS_CONNECTION_STRING ,
42
+ # credential=credential
42
43
)
43
44
tracer = TracerProvider (resource = Resource ({SERVICE_NAME : "api" }))
44
45
tracer .add_span_processor (BatchSpanProcessor (exporter ))
Original file line number Diff line number Diff line change 2
2
# The Python Worker is managed by Azure Functions platform
3
3
# Manually managing azure-functions-worker may cause unexpected issues
4
4
5
- azure-identity ~= 1.13.0
5
+ # azure-identity~=1.13.0
6
6
azure-functions ~= 1.14.0
7
7
fastapi ~= 0.96.1
8
8
aiohttp ~= 3.8.4
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ resource "azurerm_application_insights" "application_insights" {
10
10
force_customer_storage_for_profiler = false
11
11
internet_ingestion_enabled = true
12
12
internet_query_enabled = true
13
- local_authentication_disabled = true
13
+ local_authentication_disabled = false
14
14
retention_in_days = 90
15
15
sampling_percentage = 100
16
16
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" {
10
10
principal_id = azapi_resource. function . identity [0 ]. principal_id
11
11
}
12
12
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