Application Insights – Metrics, Logs and Traces · AZ-204: Developing Solutions for Microsoft Azure Monitor and Troubleshoot Azure Solutions

An ASP.NET Core application sends informational traces with a custom property named Region. You need a KQL query that returns only trace messages fro…

Practice question from Application Insights – Metrics, Logs and Traces (AZ-204: Developing Solutions for Microsoft Azure Monitor and Troubleshoot Azure Solutions), with the correct answer and a step-by-step solution.

medium · MCQ · Q-D7B25B

An ASP.NET Core application sends informational traces with a custom property named Region. You need a KQL query that returns only trace messages from the west region whose message contains the term timeout. Which query is correct?

  1. A.traces | where tostring(customDimensions["Region"]) == "west" and message has "timeout"Correct answer
  2. B.traces | where Region == "west" and message == "timeout"
  3. C.traces | where tostring(customDimensions["Region"]) == "west" | where message == "timeout"
  4. D.traces | where tostring(customDimensions["Region"]) contains "west" | where customDimensions["message"] has "timeout"

Solution

Custom properties added to trace telemetry are stored in the dynamic customDimensions column, so the Region value should be converted with tostring. The KQL has operator searches for the term timeout within the message and is more appropriate than requiring the entire message to equal that word.

More from Application Insights – Metrics, Logs and Traces

All of Application Insights – Metrics, Logs and Traces

Practise more Monitor and Troubleshoot Azure Solutions

Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.

Start practising free

Free to start · No credit card needed