Soru

Zorluk: KolayQuery and Analyze Application Insights Telemetry

A backend API running on Azure Container Instances writes diagnostic log traces to Application Insights. You need to verify if any error-level logs have been recorded recently. Which Kusto Query Language (KQL) keywords complete the query to retrieve all traces with a severity level of 3 that occurred within the last 2 hours?

Cevap:【traces】
| where timestamp > 【ago】(2h)
| where severityLevel == 3

Cevap

The correct KQL query begins with the table name 'traces' and utilizes the 'ago' function to filter for records from the last 2 hours.
The correct query targets the 'traces' table to retrieve diagnostic logs and applies a time filter using the 'ago' function to restrict results to the last 2 hours.

Adım Adım Çözüm

1
Identify the correct telemetry table for log traces.
traces
Application Insights stores diagnostic log traces (such as those from standard logging frameworks) in the 'traces' table.
2
Identify the function used for relative time range filtering.
ago
The 'ago()' function is the standard KQL operator used to subtract a time span from the current UTC time.

Anahtar Kavram

Querying trace logs in Application Insights using Kusto Query Language (KQL)
Bu soruyu puanla