-
Notifications
You must be signed in to change notification settings - Fork 36
Add app insights and Logfire instrumentation #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -12,6 +12,7 @@ param openAiEndpoint string | |||||||||||||||||||||||
| param cosmosDbAccount string | ||||||||||||||||||||||||
| param cosmosDbDatabase string | ||||||||||||||||||||||||
| param cosmosDbContainer string | ||||||||||||||||||||||||
| param applicationInsightsConnectionString string = '' | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| resource acaIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2023-01-31' = { | ||||||||||||||||||||||||
| name: identityName | ||||||||||||||||||||||||
|
|
@@ -58,6 +59,10 @@ module app 'core/host/container-app-upsert.bicep' = { | |||||||||||||||||||||||
| name: 'AZURE_COSMOSDB_CONTAINER' | ||||||||||||||||||||||||
| value: cosmosDbContainer | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
| { | ||||||||||||||||||||||||
| name: 'APPLICATIONINSIGHTS_CONNECTION_STRING' | ||||||||||||||||||||||||
| value: applicationInsightsConnectionString | ||||||||||||||||||||||||
| } | ||||||||||||||||||||||||
pamelafox marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+63
to
+66
|
||||||||||||||||||||||||
| { | |
| name: 'APPLICATIONINSIGHTS_CONNECTION_STRING' | |
| value: applicationInsightsConnectionString | |
| } | |
| // Only add the environment variable if the connection string is non-empty | |
| ...(empty(applicationInsightsConnectionString) ? [] : [ | |
| { | |
| name: 'APPLICATIONINSIGHTS_CONNECTION_STRING' | |
| value: applicationInsightsConnectionString | |
| } | |
| ]) |
Copilot
AI
Dec 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
APPLICATIONINSIGHTS_CONNECTION_STRING is set as a plain environment variable for the container app, increasing chances of accidental exposure via logs, crash dumps, or diagnostics endpoints. Attackers with limited foothold (e.g., read access to env or logs) could exfiltrate it and push malicious telemetry. Fix: store this value as a secret (Container Apps secrets or Key Vault) and reference it from the app; avoid placing it directly in environmentVariables.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.