azure-dev icon indicating copy to clipboard operation
azure-dev copied to clipboard

Update appservice.bicep with App Insights env var

Open pamelafox opened this issue 1 year ago • 2 comments
trafficstars

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.

pamelafox avatar Oct 25 '24 21:10 pamelafox

Thanks @pamelafox I think we are not taking any more changes to bicep core modules as we are almost there with AVMs here: https://github.com/Azure/azure-dev/pull/3976

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

vhvb1989 avatar Oct 25 '24 21:10 vhvb1989

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.

pamelafox avatar Oct 25 '24 22:10 pamelafox

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.

pamelafox avatar Oct 28 '24 19:10 pamelafox

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. Closing this PR

pamelafox avatar Jan 06 '25 17:01 pamelafox