-
Notifications
You must be signed in to change notification settings - Fork 210
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
Update appservice.bicep with App Insights env var #4491
Conversation
Thanks @pamelafox common/infra/bicep/app/web-appservice.bicep is becoming: /web-appservice-avm.bicep here: https://github.com/Azure/azure-dev/pull/3976/files#diff-c1aa701cf6c1c9590e75f3b45869a2b31013a8435ceac00fe13da4778bc37bb8R1 |
Okay I'll comment on that PR. I did a quick look through avm source code for the string and didnt see it, but maybe the modules are in multiple repos. |
@@ -92,6 +92,7 @@ module configAppSettings 'appservice-appsettings.bicep' = { | |||
{ | |||
SCM_DO_BUILD_DURING_DEPLOYMENT: string(scmDoBuildDuringDeployment) | |||
ENABLE_ORYX_BUILD: string(enableOryxBuild) | |||
ApplicationInsightsAgent_EXTENSION_VERSION: contains(kind, 'linux') ? '~3' : '~2' |
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.
Seems like this should be screaming caps to match env var naming convention.
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.
That's not what their docs show:
https://learn.microsoft.com/en-us/azure/azure-monitor/app/codeless-app-service?tabs=python#automate-monitoring
FYI, I haven't gotten this to successfully deploy yet, and apparently its not 3.12 compatible yet, only 3.11, so maybe its not ready for primetime. I'm working with the eng team. |
Update: I discussed this with the App Insights team, and they said that the variable is only relevant if you're using auto-instrumentation, as it will turn on the auto-instrumentation. Many of our azd templates are using manual instrumentation, so it's not relevant (and in fact, does not work as it produces a conflict). I've asked them to perhaps add a note in that "App Insights" blade that App Insights might still be enabled, even if it hasn't been auto-enabled. |
Per https://learn.microsoft.com/en-us/azure/azure-monitor/app/codeless-app-service?tabs=python#automate-monitoring , an additional environment variable is required for application monitoring in App Service.
I'm adding the same var to azure-search-openai-demo in this PR:
https://github.com/Azure-Samples/azure-search-openai-demo/pull/2083/files
And testing the deploy now.