File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3838logging .getLogger ("azure.core.pipeline.policies.http_logging_policy" ).setLevel (logging .WARNING )
3939logger = logging .getLogger (__name__ )
4040
41- # Check if the Application Insights Instrumentation Key is set in the environment variables
42- instrumentation_key = os .getenv ("APPLICATIONINSIGHTS_CONNECTION_STRING" )
43- if instrumentation_key :
44- # Configure Application Insights if the Instrumentation Key is found
45- configure_azure_monitor (connection_string = instrumentation_key )
46- logging .info ("Application Insights configured with the provided Instrumentation Key " )
41+ # Check if the Application Insights connection string is set in the environment variables
42+ appinsights_connection_string = os .getenv ("APPLICATIONINSIGHTS_CONNECTION_STRING" )
43+ if appinsights_connection_string :
44+ # Configure Application Insights if the connection string is found
45+ configure_azure_monitor (connection_string = appinsights_connection_string )
46+ logger .info ("Application Insights configured with the provided connection string " )
4747else :
48- # Log a warning if the Instrumentation Key is not found
49- logging .warning ("No Application Insights Instrumentation Key found. Skipping configuration" )
48+ # Log a warning if the connection string is not found
49+ logger .warning ("No Application Insights connection string found. Skipping configuration" )
5050
5151# Create Quart app
5252app = Quart (__name__ )
You can’t perform that action at this time.
0 commit comments