File tree Expand file tree Collapse file tree 8 files changed +11
-11
lines changed
Expand file tree Collapse file tree 8 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -177,8 +177,8 @@ To add your newly created backend image:
177177 name: 'FRONTEND_SITE_NAME'
178178 value: 'https://<website Name>.azurewebsites.net'
179179
180- name: 'APPLICATIONINSIGHTS_INSTRUMENTATION_KEY '
181- value: <Application Insights Instrumentation Key >
180+ name: 'APPLICATIONINSIGHTS_CONNECTION_STRING '
181+ value: <Application Insights Connection String >
182182
183183- Click 'Save' and deploy your new revision
184184
Original file line number Diff line number Diff line change 66 "_generator" : {
77 "name" : " bicep" ,
88 "version" : " 0.32.4.45862" ,
9- "templateHash" : " 13282901028774763433 "
9+ "templateHash" : " 14272651486454797588 "
1010 }
1111 },
1212 "parameters" : {
368368 "value" : " [format('https://{0}.azurewebsites.net', format(variables('uniqueNameFormat'), 'frontend'))]"
369369 },
370370 {
371- "name" : " APPLICATIONINSIGHTS_INSTRUMENTATION_KEY " ,
371+ "name" : " APPLICATIONINSIGHTS_CONNECTION_STRING " ,
372372 "value" : " [reference('appInsights').ConnectionString]"
373373 }
374374 ]
Original file line number Diff line number Diff line change @@ -280,7 +280,7 @@ resource containerApp 'Microsoft.App/containerApps@2024-03-01' = {
280280 value : 'https://${format (uniqueNameFormat , 'frontend' )}.azurewebsites.net'
281281 }
282282 {
283- name : 'APPLICATIONINSIGHTS_INSTRUMENTATION_KEY '
283+ name : 'APPLICATIONINSIGHTS_CONNECTION_STRING '
284284 value : appInsights .properties .ConnectionString
285285 }
286286 ]
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ AZURE_OPENAI_ENDPOINT=
66AZURE_OPENAI_MODEL_NAME = gpt-4o
77AZURE_OPENAI_DEPLOYMENT_NAME = gpt-4o
88AZURE_OPENAI_API_VERSION = 2024-08-01-preview
9- APPLICATIONINSIGHTS_INSTRUMENTATION_KEY =
9+ APPLICATIONINSIGHTS_CONNECTION_STRING =
1010
1111BACKEND_API_URL = ' http://localhost:8000'
1212FRONTEND_SITE_NAME = ' http://127.0.0.1:3000'
Original file line number Diff line number Diff line change 3232
3333
3434# Check if the Application Insights Instrumentation Key is set in the environment variables
35- instrumentation_key = os .getenv ("APPLICATIONINSIGHTS_INSTRUMENTATION_KEY " )
35+ instrumentation_key = os .getenv ("APPLICATIONINSIGHTS_CONNECTION_STRING " )
3636if instrumentation_key :
3737 # Configure Application Insights if the Instrumentation Key is found
3838 configure_azure_monitor (connection_string = instrumentation_key )
Original file line number Diff line number Diff line change 44
55
66def track_event_if_configured (event_name : str , event_data : dict ):
7- instrumentation_key = os .getenv ("APPLICATIONINSIGHTS_INSTRUMENTATION_KEY " )
7+ instrumentation_key = os .getenv ("APPLICATIONINSIGHTS_CONNECTION_STRING " )
88 if instrumentation_key :
99 track_event (event_name , event_data )
1010 else :
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def setup_environment_variables():
1616 os .environ ["COSMOSDB_KEY" ] = "mock-key"
1717 os .environ ["COSMOSDB_DATABASE" ] = "mock-database"
1818 os .environ ["COSMOSDB_CONTAINER" ] = "mock-container"
19- os .environ ["APPLICATIONINSIGHTS_INSTRUMENTATION_KEY " ] = "mock-instrumentation-key"
19+ os .environ ["APPLICATIONINSIGHTS_CONNECTION_STRING " ] = "mock-instrumentation-key"
2020 os .environ ["AZURE_OPENAI_DEPLOYMENT_NAME" ] = "mock-deployment-name"
2121 os .environ ["AZURE_OPENAI_API_VERSION" ] = "2023-01-01"
2222 os .environ ["AZURE_OPENAI_ENDPOINT" ] = "https://mock-openai-endpoint"
@@ -46,7 +46,7 @@ def ensure_env_variables(monkeypatch):
4646 "COSMOSDB_KEY" : "mock-key" ,
4747 "COSMOSDB_DATABASE" : "mock-database" ,
4848 "COSMOSDB_CONTAINER" : "mock-container" ,
49- "APPLICATIONINSIGHTS_INSTRUMENTATION_KEY " : "mock-instrumentation-key" ,
49+ "APPLICATIONINSIGHTS_CONNECTION_STRING " : "mock-instrumentation-key" ,
5050 "AZURE_OPENAI_DEPLOYMENT_NAME" : "mock-deployment-name" ,
5151 "AZURE_OPENAI_API_VERSION" : "2023-01-01" ,
5252 "AZURE_OPENAI_ENDPOINT" : "https://mock-openai-endpoint" ,
Original file line number Diff line number Diff line change 1515os .environ ["COSMOSDB_DATABASE" ] = "mock-database"
1616os .environ ["COSMOSDB_CONTAINER" ] = "mock-container"
1717os .environ [
18- "APPLICATIONINSIGHTS_INSTRUMENTATION_KEY "
18+ "APPLICATIONINSIGHTS_CONNECTION_STRING "
1919] = "InstrumentationKey=mock-instrumentation-key;IngestionEndpoint=https://mock-ingestion-endpoint"
2020os .environ ["AZURE_OPENAI_DEPLOYMENT_NAME" ] = "mock-deployment-name"
2121os .environ ["AZURE_OPENAI_API_VERSION" ] = "2023-01-01"
You can’t perform that action at this time.
0 commit comments