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?
- A.traces | where tostring(customDimensions["Region"]) == "west" and message has "timeout"Correct answer
- B.traces | where Region == "west" and message == "timeout"
- C.traces | where tostring(customDimensions["Region"]) == "west" | where message == "timeout"
- 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
- A production ASP.NET Core API uses Application Insights. The operations team wants a dashboard showing the number of failed requests and th…
- An application sends request and trace telemetry to a workspace-based Application Insights resource. You need to find failed requests toget…
- A multi-instance .NET service must publish a reliable count of checkout attempts. Adaptive sampling is enabled for request and trace teleme…
- A .NET worker records one CPU-utilization value every second and needs an accurate one-minute average in Application Insights Metrics Explo…
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 freeFree to start · No credit card needed