Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ To add your newly created backend image:
name: 'FRONTEND_SITE_NAME'
value: 'https://<website Name>.azurewebsites.net'

name: 'APPLICATIONINSIGHTS_INSTRUMENTATION_KEY'
value: <Application Insights Instrumentation Key>
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
value: <Application Insights Connection String>

- Click 'Save' and deploy your new revision

Expand Down
4 changes: 2 additions & 2 deletions deploy/macae-continer-oc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.32.4.45862",
"templateHash": "13282901028774763433"
"templateHash": "14272651486454797588"
}
},
"parameters": {
Expand Down Expand Up @@ -368,7 +368,7 @@
"value": "[format('https://{0}.azurewebsites.net', format(variables('uniqueNameFormat'), 'frontend'))]"
},
{
"name": "APPLICATIONINSIGHTS_INSTRUMENTATION_KEY",
"name": "APPLICATIONINSIGHTS_CONNECTION_STRING",
"value": "[reference('appInsights').ConnectionString]"
}
]
Expand Down
2 changes: 1 addition & 1 deletion deploy/macae-continer.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ resource containerApp 'Microsoft.App/containerApps@2024-03-01' = {
value: 'https://${format(uniqueNameFormat, 'frontend')}.azurewebsites.net'
}
{
name: 'APPLICATIONINSIGHTS_INSTRUMENTATION_KEY'
name: 'APPLICATIONINSIGHTS_CONNECTION_STRING'
value: appInsights.properties.ConnectionString
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/backend/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AZURE_OPENAI_ENDPOINT=
AZURE_OPENAI_MODEL_NAME=gpt-4o
AZURE_OPENAI_DEPLOYMENT_NAME=gpt-4o
AZURE_OPENAI_API_VERSION=2024-08-01-preview
APPLICATIONINSIGHTS_INSTRUMENTATION_KEY=
APPLICATIONINSIGHTS_CONNECTION_STRING=

BACKEND_API_URL='http://localhost:8000'
FRONTEND_SITE_NAME='http://127.0.0.1:3000'
2 changes: 1 addition & 1 deletion src/backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@


# Check if the Application Insights Instrumentation Key is set in the environment variables
instrumentation_key = os.getenv("APPLICATIONINSIGHTS_INSTRUMENTATION_KEY")
instrumentation_key = os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING")
if instrumentation_key:
# Configure Application Insights if the Instrumentation Key is found
configure_azure_monitor(connection_string=instrumentation_key)
Expand Down
2 changes: 1 addition & 1 deletion src/backend/event_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


def track_event_if_configured(event_name: str, event_data: dict):
instrumentation_key = os.getenv("APPLICATIONINSIGHTS_INSTRUMENTATION_KEY")
instrumentation_key = os.getenv("APPLICATIONINSIGHTS_CONNECTION_STRING")
if instrumentation_key:
track_event(event_name, event_data)
else:
Expand Down
4 changes: 2 additions & 2 deletions src/backend/tests/agents/test_human.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def setup_environment_variables():
os.environ["COSMOSDB_KEY"] = "mock-key"
os.environ["COSMOSDB_DATABASE"] = "mock-database"
os.environ["COSMOSDB_CONTAINER"] = "mock-container"
os.environ["APPLICATIONINSIGHTS_INSTRUMENTATION_KEY"] = "mock-instrumentation-key"
os.environ["APPLICATIONINSIGHTS_CONNECTION_STRING"] = "mock-instrumentation-key"
os.environ["AZURE_OPENAI_DEPLOYMENT_NAME"] = "mock-deployment-name"
os.environ["AZURE_OPENAI_API_VERSION"] = "2023-01-01"
os.environ["AZURE_OPENAI_ENDPOINT"] = "https://mock-openai-endpoint"
Expand Down Expand Up @@ -46,7 +46,7 @@ def ensure_env_variables(monkeypatch):
"COSMOSDB_KEY": "mock-key",
"COSMOSDB_DATABASE": "mock-database",
"COSMOSDB_CONTAINER": "mock-container",
"APPLICATIONINSIGHTS_INSTRUMENTATION_KEY": "mock-instrumentation-key",
"APPLICATIONINSIGHTS_CONNECTION_STRING": "mock-instrumentation-key",
"AZURE_OPENAI_DEPLOYMENT_NAME": "mock-deployment-name",
"AZURE_OPENAI_API_VERSION": "2023-01-01",
"AZURE_OPENAI_ENDPOINT": "https://mock-openai-endpoint",
Expand Down
2 changes: 1 addition & 1 deletion src/backend/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
os.environ["COSMOSDB_DATABASE"] = "mock-database"
os.environ["COSMOSDB_CONTAINER"] = "mock-container"
os.environ[
"APPLICATIONINSIGHTS_INSTRUMENTATION_KEY"
"APPLICATIONINSIGHTS_CONNECTION_STRING"
] = "InstrumentationKey=mock-instrumentation-key;IngestionEndpoint=https://mock-ingestion-endpoint"
os.environ["AZURE_OPENAI_DEPLOYMENT_NAME"] = "mock-deployment-name"
os.environ["AZURE_OPENAI_API_VERSION"] = "2023-01-01"
Expand Down
Loading