Snippet
Search every App table for one phrase
A complete KQL privacy smoke test that searches all Application Insights tables in the workspace, including the ones a classic search misses.
AI-generated, human-reviewed: the first draft was generated by an AI agent; I fact-checked, tested, and edited it. AI use policy
What it does#
Searches every App* table in the Log Analytics workspace for one phrase and returns a row
count per table. Type a unique phrase into your agent, wait for ingestion, and run it. Zero rows
is the only acceptable answer for prompt or answer text.
You need#
- A Log Analytics workspace that receives Application Insights data
- A unique phrase you sent through the agent in the last hour
Where it goes#
Run it in the workspace’s Logs page, not the Application Insights resource. Replace
PASTE_A_PHRASE_YOU_TYPED.
// SPDX-License-Identifier: MIT
// Copyright (c) 2026 Sarang Datye
// Searches every Application Insights table in the Log Analytics workspace for one phrase.
// Run it in the workspace, not the Application Insights resource: AppGenAIContent is
// workspace-only, and a classic-table search cannot see it.
// Expect zero rows for any prompt or answer phrase you typed.
let phrase = "PASTE_A_PHRASE_YOU_TYPED";
let lookback = 1h;
union withsource=Table App*
| where TimeGenerated > ago(lookback)
| where * has phrase
| summarize rows = count() by Table
| order by rows desc
Check that it works#
Search for a phrase you know is in telemetry, such as one of your hop markers, and you get rows
from AppTraces or AppDependencies. Search for a prompt phrase and you get nothing.