0
votes

I have an azure function which is logging to application insights which is set to store logs at information level.

All the initial logs are working fine, however it gets to a point and they stop. If I look at live metrics I can still see the logs being triggered but they don't appear in Application Insights.

Live metrics showing logs at 11:32

Live Metics

Application insights no logs after 11:31

Application Insights

The function itself runs for about 12 minutes but I don't know if this is a time thing.

1
It should be the delay in application insights. You can wait for a few more time and see if it's there. - Ivan Yang
Wasn't a delay, a few days have gone past and the logs for that session still end at the same place - Tim Griffiths
Can you show some sample code, and the host.json file? - Ivan Yang

1 Answers

0
votes

Discovered that the logs were being cut off due to app insights sampling feature (https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring?toc=%2fazure%2fazure-functions%2fdurable%2ftoc.json#configure-sampling) where app insights will start ignoring logs if the rate of logs goes over a threshold.