question

Tech7868 avatar image
0 Votes"
Tech7868 asked sihbher commented

Azure function logs not going to App insight

Hi

Recently our azure python based azure function has stopped logging anything to application insight. We are not sure what went wrong. There are no errors logged anywhere. I can see the logs through the kudu but nothing in app insights.

Our function app is in vnet with private endpoint.

Also, does app insight needs to have workspace mode. Seems like in classic mode nothing gets logged.

Thanks

azure-functions
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PramodValavala-MSFT avatar image
0 Votes"
PramodValavala-MSFT answered

@Tech7868 Since your function app is inside a VNET, it is possible that you have the VNET_ROUTE_ALL app setting set to 1 forcing all traffic via the VNET.

If the VNET doesn't have an outbound rule for the AzureMonitor Service Tag, application insight requests won't get through.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JaliyaUdagedara avatar image
0 Votes"
JaliyaUdagedara answered Tech7868 commented

Workspace-based Application Insights is now the preferred resource for sending telemetry, and Classic Application Insights is going to get retired on 29 Feb 2024. Saying that technically Classic Application Insights should continue to work as it at least up until 29 Feb 2024.

Since this is broken for some reason, I would personally suggest creating a Workspace-based Application Insights and use that for your logging. Check whether it works, if it is, we will have to investigate what broke Classic Application Insights, ideally through an Azure Support Ticket. If it still doesn't work, then something must have changed in the configuration.

Hope this makes sense!

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @JaliyaUdagedara - thanks for replying. We tried in workspace mode also but it doesnt work. When the app is vnet connected it doesnt matter on the mode as in both mode it doesnot work.

When the app is outside vnet, it only works in workspace mode somehow.

Nothing was changed in the app configuration but we are still working through it and trying to see what caused this.

Thanks

0 Votes 0 ·
Tech7868 avatar image
0 Votes"
Tech7868 answered sihbher commented

Thanks @PramodValavala-MSFT and @JaliyaUdagedara

There was firewall issue on the vnet routing.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Tech7868/@PramodValavala-MSFT /@JaliyaUdagedara, I have the same issue, could you please comment what to check or what was the solution?

0 Votes 0 ·