PUBLIC BETA OFFER

Save 50% off on an Eligible Learning PlanValid for 1-month plan, 3-month plan, 12-month plan · Code LPXBETA50 · Ends Dec 6, 2026

AZ-401: Log Analytics Queries and AI Assisted Verification

Author a bounded query over verified Log Analytics schema and time scope, then check an assisted proposal against raw rows, filters, aggregation and actual execution evidence.

Guide

Content version 1.0

AZ-401: Log Analytics Queries and AI Assisted Verification

AZ-401: Log Analytics Queries and AI Assisted Verification

Answer a bounded log question reliably by choosing the actual resource or workspace, time interval and populated schema before authoring a query. Run a small Kusto Query Language (KQL) baseline, inspect its rows, and compare any artificial intelligence (AI) assisted proposal with that same population, field meaning and execution evidence. Filters, selected columns and aggregation must preserve the intended question. An assistant's explanation is a proposal to verify, not proof that a query ran or that its answer is correct.

This procedure uses existing Azure Monitor Logs data and authorized query access. It includes a concrete basic query, supported filtering steps and an assisted-query review/run path. No query has been executed for this article, and no returned counts, latency values or successful outcomes are claimed. Telemetry collection and mitigation remain separate work; begin with the distinctions in AZ-401: Infrastructure Metrics Application Telemetry and Distributed Traces.

Define one question and its evidence boundary

Choose a question small enough to check against individual records. For example, an operator with relevant request telemetry might ask which recorded requests belong to one observed operation during a specified recent interval, and what duration evidence is available for that population. This is an illustrative investigation question, not a claim that every application records the same table or fields.

Write down the application/environment, allowed workspace or resource, start and end of the intended interval, operation identity and requested output. Decide whether the answer needs raw records or a summary. If a duration is requested, identify the field's actual unit and whether the question asks for a maximum, average or another measure. Those are different questions; do not let a fluent assistant substitute one for another.

Use an authorized read-only investigation scope with a bounded interval and avoid broad exploratory exports. Queries can consume resources, and records may contain sensitive application or user data. Share only the schema and context permitted for the chosen assistant, not credentials or unnecessary raw telemetry. An inability to access a table is a boundary to resolve with its owner, not a reason to widen permissions or invent a result.

Inspect the actual scope and populated schema

Open Logs for the intended resource or workspace and verify the displayed scope. Inspect Tables and the selected table's schema. The Log Analytics tutorial uses AppRequests, with example columns such as Name, Url, DurationMs and ResultCode; owned workspaces can differ. Use that example only if the actual table and needed columns exist and contain relevant data.

Confirm the following before composing the query:

Check Evidence required
Scope Actual workspace/resource identity and the application/environment it represents
Schema Existing table and field names, types, units and relevant identifiers
Population Evidence that the table contains the intended kind of records
Time Intended interval, query predicates and time-picker selection
Freshness Relevant observed record times and any known collection delay
Access Query succeeds under the authorized identity rather than silently using another context

A missing example table does not justify creating a collection stack in this exercise. Select an existing suitable populated table only after inspecting its schema and confirming the question still applies. If none is available, record the missing prerequisite and stop. Sample data can teach the interface but cannot prove an answer about the real application.

Author and run the basic KQL baseline

When the preceding checks confirm that AppRequests is the appropriate populated table, enter this basic query in KQL mode:

AppRequests

Select the agreed bounded Time range and Run. A table name alone is the tutorial's basic query form; the displayed rows are subject to the results limit. Inspect actual returned records, relevant timestamps and the execution result. Record errors or absence of data honestly. Do not replace the table name blindly when the intended population or schema has not been established.

The baseline answers whether relevant records are available for the selected scope and interval; it does not yet answer every application-specific question. Preserve its text and settings before narrowing it. If the preview or editor already contains a time predicate, inspect it as well as the time picker. Do not assume two different time restrictions automatically produce the intended interval. Keep the effective bounds explicit when comparing executions.

A rolling recent interval can move between runs. Record execution times and the actual bounds used; use a common supported interval for a controlled comparison where possible. If arrivals or window movement change the population, report that limitation rather than demanding identical counts from different data.

Add a supported population filter and inspect its KQL

For the tutorial's request schema, Simple mode offers Add filters for a field such as Name. Choose an actual operation value present in the relevant data, then return to KQL mode and inspect the generated query predicate. Run that query for the agreed interval and compare its rows with the baseline. This gives a concrete authoring path without guessing an unsupported operator recipe or a nonexistent operation name.

Check that included rows match the intended operation and that the predicate did not drop the required application or environment condition. If the filter offers no expected value, investigate scope, interval and available data before changing the question. Preserve the generated query text, not just a screenshot of the selected control.

Distinguish server-side query filtering from browser-only display changes. Searching displayed results or filtering a visible column does not by itself establish that the executed query selected a different population. Re-run the intended query and retain its actual output context whenever the answer depends on filtered data.

Check columns and aggregation before accepting a summary

A projection chooses which fields a query returns. Review an assisted proposal's output fields even when its filter appears correct: removing the operation identifier, timestamp or unit-bearing value can prevent verification. Conversely, showing every field may expose unnecessary data. Keep the fields needed to answer and check the question, and distinguish query output selection from merely hiding a column in the interface. No advanced projection syntax is required by the basic example here.

For the tutorial's confirmed schema, the Columns sidebar supports grouping and pivoting returned results, including grouping by Url and inspecting a maximum of DurationMs. Such display processing works on returned data; it does not re-fetch a complete population. Do not label a maximum over displayed rows as a verified maximum over all application traffic.

Before relying on any aggregate, compare it with underlying records and the requested meaning:

  • Does grouping use the intended operation or resource, rather than combining different environments?
  • Are the numeric field and units the ones the question specifies?
  • Does the aggregate operate over the intended query population, or only a limited returned set?
  • Could missing data, result limits or changed time bounds explain the apparent difference?
  • Does the selected summary answer the question, or merely produce an attractive chart?

For a small returned subset, inspect the underlying values directly as a reasonableness check. That check can expose a wrong unit or grouping choice, but it is not proof about records outside the subset. If a proposed server-side aggregation uses syntax that has not been verified, stop before executing it and obtain the relevant supported query reference. Do not invent a detailed aggregation recipe from a display example.

Request and review a schema-bound assisted query

Use an existing approved assistant with the permitted context. A useful request supplies the question, verified scope and schema, time boundaries and required evidence. It also limits action. Adapt the following wording to the actual confirmed table and fields rather than pasting an unverified schema:

Propose a read-only query for the confirmed request table and observed operation in the approved workspace/resource and stated interval. Use only the schema and field meanings I supplied. Explain every population filter and returned field. Keep the row-level query separate from any optional aggregation, identify its grouping and units, and state assumptions or missing context. Do not execute the query or change resources. Return the proposed query text for review; do not invent output values.

Compare the proposal with the manually established baseline and generated filter. Reject invented tables, columns, resource names or result values. Check omitted predicates as carefully as added ones. A syntactically plausible query can still answer a different population or interval. Preserve the proposed text and explain any correction before using the revised candidate.

If the assistant supplies only prose, asks for unavailable schema or cannot expose enough query/evidence context to inspect its reasoning, report that limitation. Continue with the supported manual query where it answers the bounded question; do not promote an uninspectable explanation into a verified assisted-query result.

Keep assistant products and access paths distinct

Azure Copilot Observability Agent supports natural-language exploration of logs and other telemetry, scoped to the resource from which its chat is launched. Its on-demand chat and investigation do not require provisioning the preview autonomous-operations resource. The preview autonomous capability has a separate boundary; enabling it is unnecessary for this query exercise. Verify that the launch-resource context matches the query's intended scope before comparing an answer.

For site reliability engineering (SRE) investigations, Azure SRE Agent uses configured integrations, permissions, run modes and tool governance. Its ability to investigate or perform other actions does not authorize mitigation here. Keep query review separate from any proposed operational change and inspect the actual data source used by the configured integration.

The Azure DevOps Model Context Protocol (MCP) Server supplies Azure DevOps context such as work items and builds. That connection alone does not establish access to Log Analytics. Remote authentication requires an organization backed by Microsoft Entra, and client compatibility differs from the local server. Do not treat any one assistant connection as a universal telemetry credential. GitHub Copilot's responsible-use guidance likewise requires contextual review of generated work; agent capability is not a correctness guarantee.

Execute the reviewed query and compare actual evidence

Once the candidate's syntax, scope and population are supported and the operator has authorized the bounded read, place the reviewed text in the Log Analytics editor and Run it. Execute the intended query, not an adjacent query left in the editor. Inspect the actual success or error response, returned schema and rows, time context and result-limit conditions.

Compare the result with the question and baseline. For a row query, inspect whether observed operation values, relevant identifiers and timestamps satisfy the intended restrictions. For a summary, retain a row-level comparison where practical and explain grouping, units and population differences. A difference is a reason to investigate, not permission to choose whichever answer looks more plausible.

Use this completion record without filling it with predicted values:

Record What the operator must capture
Question and authorized context Application, environment, identity boundary and intended population
Query versions Manual baseline, assisted proposal and final reviewed text
Execution Actual scope, time bounds, execution time and success/error response
Observed data Relevant rows or aggregate, field meanings and result-limit caveats
Comparison Why the output matches the question, or the exact unresolved mismatch
Conclusion Supported answer and uncertainty, or a blocked/absent-data finding

An error is not an observed zero. An empty result can reflect the interval, a filter, missing collection or access problems; it cannot alone prove no incident or no failures. A chart over old records cannot establish current health. If these conditions prevent an answer, record them and hand the precise prerequisite back to the data owner.

Keep the final query, settings and evidence references in an approved location with appropriate access. State what was actually run, which proposal was corrected or rejected, and what remains unknown. The useful outcome is a reproducible answer tied to the intended records and interval, not an assistant response detached from execution evidence. Metric governance and mitigation decisions remain separate, as discussed in the related articles.

Authoritative Sources

0 views