Open dmytro-gokun opened 5 months ago
@liliankasem I've done some additional testing and i can confirm that ApplicationStopping & ApplicationStopped events are fired indeed. So the problem (most likely) is in some events not reaching AI indeed. I think, we need some fix for this
Is there any chance this gets worked on any time soon?
Description
We have a .NET 8 function app (isolated). When the app starts we register this lifetime callbacks:
In this application we also have configured Application Insights logging using services.AddApplicationInsightsTelemetryWorkerService()/services.ConfigureFunctionsApplicationInsights().
All in all, logging works just fine and we get all our log in AI. "Application started" is getting to AI as well. But we never get "Application stopping"/"Application stopped" in AI. My assumption is that the function app exits before those message are actually transmitted to AI server. Is this correct? Is there any way to fix this behavior?
Steps to reproduce