microsoft / ApplicationInsights-dotnet

ApplicationInsights-dotnet
MIT License
565 stars 287 forks source link

Traces lost after long await? #2837

Open spplante opened 11 months ago

spplante commented 11 months ago

Not sure if this is a bug related to Azure Insights or Function Apps, but I am using an Azure Function v4 in .net 6.0 and I am randomly loosing all logs after awaiting for an async method that takes roughly +- 8 minutes to complete.

When executing the function using the Test/Run button in Azure, I can see all logs correctly in the live console, however in both the Monitor page or Azure Insights the traces after the long await don't exist.

I validated that there is 0% sampling in Azure Insights going on.

It looks like after a certain amount of time Insights just gives up and goes to sleep. I have had one successfull execution where 100% of the traces were there, in this case the long operation took +- 6 min instead of 8 minutes, not sure if it has something to do with this...

Any idea what's going on?