Sunday, September 5, 2021

How to check Elastic Premium Plan Function App allocated instance counts history

Dennis411_0-1630312212764.png

 

Recently I’ve been asked many times about how to check metrics of Elastic Premium Plan Function App allocated instances counts history.

 

We have below 3 ways to check from different perspective.

 

1. Go to Diagnose and solve problems --> HTTP Functions Scaling --> Number of workers allocated to the Function App

   Dennis411_0-1630309349617.png  This feature currently can be used  without charging ,  however it’s only allowed to check last 24 hours history.

 

2. After enabling Application insight,   we can go to Application insights --> Live metrics to check how many instances are currently allocated to this function app currently.

Dennis411_0-1630640507251.png

 

 

3. If customer wanted to check metrics for a longer time than 24 hours,  we can enable scale-controller-log (currently preview) to check. 

https://docs.microsoft.com/en-us/azure/azure-functions/functions-monitoring#scale-controller-logs

 

Here is the steps how we enable it.  

https://docs.microsoft.com/en-us/azure/azure-functions/configure-monitoring?tabs=v2#configure-scale-controller-logs

 

After enabling scale-controller-log, we can use below queries to check the instance counts history

 

traces

| extend CustomDimensions = todynamic(tostring(customDimensions))

| where CustomDimensions.Category == "ScaleControllerLogs"

| where message == "Instance count changed"

| extend Reason = CustomDimensions.Reason

| extend PreviousInstanceCount = CustomDimensions.PreviousInstanceCount

| extend NewInstanceCount = CustomDimensions.CurrentInstanceCount

 

https://docs.microsoft.com/en-us/azure/azure-functions/analyze-telemetry-data#query-scale-controller-logs

 

 

We may get the result like below which clearly records all the instance counts history.

Dennis411_2-1630309349644.png

 

Thanks for reading this post. I hope you enjoyed it. Please feel free to write your comments and views about the same over here.

 

Posted at https://sl.advdat.com/3h6GkJ9