Skip to content

Commit 4e9a3c7

Browse files
committed
Clarifying steps to view ilogger telemetry
1 parent 694ec98 commit 4e9a3c7

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

articles/azure-monitor/app/ilogger.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,20 @@ If any other type is used as a scope, it's stored under the property `Scope` in
274274

275275
`ApplicationInsightsLoggerProvider` captures `ILogger` logs and creates `TraceTelemetry` from them. If an `Exception` object is passed to the `Log` method on `ILogger`, `ExceptionTelemetry` is created instead of `TraceTelemetry`.
276276

277-
These telemetry items can be found in the same places as any other `TraceTelemetry` or `ExceptionTelemetry` items for Application Insights, including the Azure portal, analytics, or the Visual Studio local debugger.
277+
**Viewing ILogger Telemetry**
278+
279+
In the Azure Portal:
280+
1. Go to the Azure Portal and access your Application Insights resource.
281+
2. Click on the "Logs" section inside Application Insights.
282+
3. Use Kusto Query Language (KQL) to query ILogger messages, usually stored in the `traces` table.
283+
- Example Query: `traces | where message contains "YourSearchTerm"`.
284+
4. Refine your queries to filter ILogger data by severity, time range, or specific message content.
285+
286+
In Visual Studio (Local Debugger):
287+
1. Start your application in debug mode within Visual Studio.
288+
2. Open the "Diagnostic Tools" window while the application runs.
289+
3. In the "Events" tab, ILogger logs appear along with other telemetry data.
290+
4. Utilize the search and filter features in the "Diagnostic Tools" window to locate specific ILogger messages.
278291

279292
If you prefer to always send `TraceTelemetry`, use this snippet:
280293

0 commit comments

Comments
 (0)