Microsoft DevOps Engineer Expert AZ-400 Practice Question
You are troubleshooting a production Azure App Service that is instrumented with the Application Insights SDK. Telemetry from the app is stored in a Log Analytics workspace. You suspect that high values of the 'Process \ Private Bytes' performance counter correlate with increases in request latency. Create a single Kusto Query Language (KQL) statement that, for the last two hours, returns one row per 5-minute window containing the average request duration in milliseconds and the maximum value of the 'Process \ Private Bytes' counter. Which KQL statement should you run so you can plot both metrics on the same time-series chart?
performanceCounters | where name == "Private Bytes" and timestamp > ago(2h) | summarize maxPrivateBytes = max(value) by bin(timestamp, 5m) | project timestamp, maxPrivateBytes
requests | where timestamp > ago(2h) | join kind = inner performanceCounters on timestamp | where name == "Private Bytes" | summarize avgDurationMs = avg(duration/1ms), maxPrivateBytes = max(value) by bin(timestamp, 5m)
make-series avgDurationMs = avg(duration/1ms), maxPrivateBytes = maxif(value, name == "Private Bytes") on timestamp from ago(2h) to now() step 5m in (requests, performanceCounters)
requests | where timestamp > ago(2h) | summarize avgDurationMs = avg(duration/1ms) by bin(timestamp, 5m) | join kind = inner ( performanceCounters | where timestamp > ago(2h) and name == "Private Bytes" | summarize maxPrivateBytes = max(value) by bin(timestamp, 5m) ) on timestamp | project timestamp, avgDurationMs, maxPrivateBytes