'Azure Functions Elastic Premium plan scaling events
I'm currently working on alerts based on scaling events. We have an Azure Function with Elastic Premium plan. I want to get alerts when the number of active instances reaches some amount.
What I've tried?
Based on this documentation, I've tried to add logging for scaling events by adding configuration SCALE_CONTROLLER_LOGGING_ENABLED=AppInsights:Verbose
After that, I've tried query from this documentation. But for some reason, it doesn't work for me. 
Also, I am sure, that there was scaling events already, since I see the amount of instances of current function 
One possible way that comes to my mind is to query the number of instances from traces
traces
| where timestamp >= ago(10m)
| where cloud_RoleName == 'func-application-dev'
| summarize dcount(cloud_RoleInstance)
But I don't really like this approach. I want to see scaling events in the logs. Is it possible to achieve this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
