You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering what happens when a Container App scales down to zero. Are all injected dependencies correctly disposed? Or could it happen that the process is killed without waiting for all dependencies to be disposed correctly?
Reason I ask is that I inject an object as a Singleton (AddSingleton) in the Startup class that uses Application Insights and sends trace logs to AI. In the Dispose of this class I call a TelemetryClient.FlushAsync() which is required because otherwise the final log statements won't arrive in AI.
We have some Container Apps that run Azure Functions (ServiceBusTriggers) and it looks like sometimes the final log statements don't arrive in Application Insights. That's why I'm suspecting that the Dispose operation is sometimes not executed correctly when a Container App scales down.
I have only noticed this behavior in Container Apps. In our Azure Functions (Premium ASP) things are fine.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm wondering what happens when a Container App scales down to zero. Are all injected dependencies correctly disposed? Or could it happen that the process is killed without waiting for all dependencies to be disposed correctly?
Reason I ask is that I inject an object as a Singleton (AddSingleton) in the Startup class that uses Application Insights and sends trace logs to AI. In the Dispose of this class I call a TelemetryClient.FlushAsync() which is required because otherwise the final log statements won't arrive in AI.
We have some Container Apps that run Azure Functions (ServiceBusTriggers) and it looks like sometimes the final log statements don't arrive in Application Insights. That's why I'm suspecting that the Dispose operation is sometimes not executed correctly when a Container App scales down.
I have only noticed this behavior in Container Apps. In our Azure Functions (Premium ASP) things are fine.
Beta Was this translation helpful? Give feedback.
All reactions