Monitoring of distributed app hosted in Azure App
ServiceAlexander Laysha,Chief Software Engineer at EPAM Systems
Agenda• Overview of Monitoring in Azure• App Service Monitoring: App Insights & Azure Portal• App Service Monitoring : Stream Analytics & Power BI• App Service Monitoring : Advanced approach
Monitoring in Azure: Non-Compute Resources
Monitoring in Azure: Compute Resources
Azure monitoring offerings• Azure Insights (Platform) Monitoring• Application Insights• Log Analytics
DEMO #1Audit logs, metrics & diagnostics on Azure Portal
Primitive Distributed Architecture
Azure Web App(1-N instances)
Actor Azure Web Job(1-N instances)
QueueLoad balancer
ActivityId ActivityId
ActivityId
Monitoring: App Insights & Azure Portal
Azure Web Job(1-N instances)
Azure Web App(1-N instances)
Queue
ActivityId ActivityId
Azure App Insights
Microsoft Azure Resource Metrics
ActivityId ActivityId
ActivityId
ContinuesExport
Azure Storage Blobs
DEMO #2Ambient Context Implementation &
Monitoring of App Service based on App Insights and Azure Portal
Existing Challenges• Minimal chart auto-refresh time is 5 mins• Total data rate for App Insights is limited 500 dp/s, exceptions to 50 dp/s
• Total data points for App Insights per month are limited 50M/month
• Limited support for Live Metrics Stream no data store, no additional charts, no configuration, no custom data, can’t be pinned on dashboard
• Not all App Insights charts be pinned on dashboard• Retention period 7 days for raw data and 90 days for aggregated data
• Delay between data sending and displaying
Delay between data sending and displaying
Custom Metric Custom EventSingle Request Multiple (500) Requests Single Request
# Delay, s # Delay, s # Delay, s
1 98 1 70 1 107
2 105 2 58 2 136
3 143 3 68 3 103
4 93 4 83 4 137
5 127 5 80 5 114
6 108 6 95 6 106
7 138 7 52 7 108
8 118 8 80 8 123
9 134 9 80 9 128
10 117 10 56 10 133
Average 118 Average 72 Average 120
Monitoring: Stream Analytics & PowerBI
Metrics Collector Web Job
Azure Insights REST API
Azure App Insights
Metrics & Events StorageIncludes exported diagnostics from
Azure Resources
Azure Stream Analytics Power BIREST API
FIFO Retention Policy
Continues Export
Processed MetricsRaw Metrics
Resource Metrics
DEMO #3Monitoring of App Service based on Stream Analytics and Power BI
Existing challenges• Azure Stream Analytics creates FIFO dataset by default Each table in FIFO dataset stores up to 200,000 rows
• Azure Stream Analytics doesn’t support multiple PowerBI outputs to the same dataset
One dataset & one table for each PowerBI output
• A table with none retention police can store up to 5,000,000 rows Power BI REST API doesn’t provide the ability to clear table partly
• Delay between sending data to App Insights and exporting
Delay between data sending and exporting
Metric Custom EventSingle Request Single Request
# Delay, s # Delay, s
1 141 1 144
2 153 2 156
3 154 3 159
4 142 4 139
5 159 5 162
6 163 6 135
7 160 7 163
8 150 8 153
9 162 9 135
10 139 10 143
Average 152 Average 149
Monitoring: Advanced approach
PowerBIREST API or
External Analysis Storage (DirectQuery)
Metrics Collector Web Job Azure Insights REST API
Azure Web Job
Azure Web AppOther Sources
Diagnostics Logs, Azure Storage Analytics, etc.
3rd Party or Custom Monitoring
Event Hub Azure Function
DEMO #4Monitoring of App Service based on Event Hub
Q&A
Join us in FB: https://www.facebook.com/groups/AzureBelarus