Skip to content

Commit f455ad9

Browse files
Merge pull request #234843 from AaronMaxwell/aaronmax-asp-net-trace-logs-search-fix
https://github.com/MicrosoftDocs/azure-docs/issues/108234
2 parents 1671567 + a5a60f8 commit f455ad9

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

articles/azure-monitor/app/asp-net-trace-logs.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ description: Search logs generated by Trace, NLog, or Log4Net.
44
ms.topic: conceptual
55
ms.devlang: csharp
66
ms.custom: devx-track-csharp
7-
ms.date: 03/22/2023
7+
ms.date: 04/18/2023
88
ms.reviewer: casocha
99
---
1010

11-
1211
# Explore .NET/.NET Core and Python trace logs in Application Insights
1312

14-
Send diagnostic tracing logs for your ASP.NET/ASP.NET Core application from ILogger, NLog, log4Net, or System.Diagnostics.Trace to [Azure Application Insights][start]. For Python applications, send diagnostic tracing logs by using AzureLogHandler in OpenCensus Python for Azure Monitor. You can then explore and search for them. Those logs are merged with the other log files from your application. You can use them to identify traces that are associated with each user request and correlate them with other events and exception reports.
13+
Send diagnostic tracing logs for your ASP.NET/ASP.NET Core application from ILogger, NLog, log4Net, or System.Diagnostics.Trace to Azure Application Insights. For Python applications, send diagnostic tracing logs by using AzureLogHandler in OpenCensus Python for Azure Monitor. You can then explore and search for them. Those logs are merged with the other log files from your application. You can use them to identify traces that are associated with each user request and correlate them with other events and exception reports.
1514

1615
> [!NOTE]
1716
> Do you need the log-capture module? It's a useful adapter for third-party loggers. But if you aren't already using NLog, log4Net, or System.Diagnostics.Trace, consider calling [**Application Insights TrackTrace()**](./api-custom-events-metrics.md#tracktrace) directly.
@@ -38,7 +37,7 @@ Install your chosen logging framework in your project, which should result in an
3837

3938
## Configure Application Insights to collect logs
4039

41-
[Add Application Insights to your project](./asp-net.md) if you haven't done that yet. You'll see an option to include the log collector.
40+
[Add Application Insights to your project](./asp-net.md) if you haven't done that yet and there is an option to include the log collector.
4241

4342
Or right-click your project in Solution Explorer to **Configure Application Insights**. Select the **Configure trace collection** option.
4443

@@ -167,7 +166,7 @@ You can also add a severity level to your message. And, like other telemetry, yo
167166
new Dictionary<string, string> { { "database", "db.ID" } });
168167
```
169168

170-
Now you can easily filter out in [Search][diagnostic] all the messages of a particular severity level that relate to a particular database.
169+
Now you can easily filter out in **Transaction Search** all the messages of a particular severity level that relate to a particular database.
171170

172171
## AzureLogHandler for OpenCensus Python
173172

@@ -191,7 +190,7 @@ logger.warning('Hello, World!')
191190

192191
Run your app in debug mode or deploy it live.
193192

194-
In your app's overview pane in the [Application Insights portal][portal], select [Search][diagnostic].
193+
In your app's overview pane in the Application Insights portal, select **Transaction Search**.
195194

196195
You can, for example:
197196

@@ -231,7 +230,7 @@ The Application Insights Java agent collects logs from Log4j, Logback, and java.
231230

232231
### <a name="emptykey"></a>Why do I get the "Instrumentation key cannot be empty" error message?
233232

234-
You probably installed the logging adapter NuGet package without installing Application Insights. In Solution Explorer, right-click *ApplicationInsights.config*, and select **Update Application Insights**. You'll be prompted to sign in to Azure and create an Application Insights resource or reuse an existing one. That should fix the problem.
233+
You probably installed the logging adapter NuGet package without installing Application Insights. In Solution Explorer, right-click *ApplicationInsights.config*, and select **Update Application Insights**. You are prompted to sign in to Azure and create an Application Insights resource or reuse an existing one. It should fix the problem.
235234

236235
### Why can I see traces but not other events in diagnostic search?
237236

@@ -247,10 +246,9 @@ Perhaps your application sends voluminous amounts of data and you're using the A
247246

248247
## <a name="add"></a>Next steps
249248

250-
* [Diagnose failures and exceptions in ASP.NET][exceptions]
251-
* [Learn more about Search][diagnostic]
252-
* [Set up availability and responsiveness tests][availability]
253-
* [Troubleshooting][qna]
249+
* [Diagnose failures and exceptions in ASP.NET](asp-net-exceptions.md)
250+
* [Learn more about Transaction Search](diagnostic-search.md)
251+
* [Set up availability and responsiveness tests](availability-overview.md)
254252

255253
<!--Link references-->
256254

0 commit comments

Comments
 (0)