Skip to content

Commit fee36d1

Browse files
committed
Avoid directional terms. Add link to App Insights Logger topic
1 parent 6890a0e commit fee36d1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

articles/azure-monitor/snapshot-debugger/snapshot-debugger-vm.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,6 @@ using Microsoft.ApplicationInsights;
128128
using Microsoft.ApplicationInsights.DataContracts;
129129
using Microsoft.ApplicationInsights.Extensibility;
130130

131-
namespace AppInsightsWorkerServiceExample;
132-
133131
internal class ExampleService
134132
{
135133
private readonly TelemetryClient _telemetryClient;
@@ -160,7 +158,7 @@ internal class ExampleService
160158
}
161159
```
162160

163-
Below, is another example using `ILogger`. In this case, when handling an exception, be sure to pass the exception as the first parameter to `LogError`.
161+
The following example uses `ILogger` instead of `TelemetryClient`. This example assumes you're using the [Application Insights Logger Provider](../app/ilogger.md#console-application). As the example shows, when handling an exception, be sure to pass the exception as the first parameter to `LogError`.
164162

165163
```csharp
166164
using Microsoft.Extensions.Logging;
@@ -191,7 +189,7 @@ internal class LoggerExample
191189
```
192190

193191
> [!NOTE]
194-
> By default, the Application Insights Logger (`ApplicationInsightsLoggerProvider`) forwards exceptions to the Snapshot Debugger via `TelemetryClient.TrackException`. This behavior is controlled via the `TrackExceptionsAsExceptionTelemetry` property on the `ApplicationInsightsLoggerOptions` class. If you set `TrackExceptionsAsExceptionTelemetry` to `false` when configuring the Application Insights Logger, then the example above will not trigger the Snapshot Debugger. In this case, modify your code to call `TrackException` manually.
192+
> By default, the Application Insights Logger (`ApplicationInsightsLoggerProvider`) forwards exceptions to the Snapshot Debugger via `TelemetryClient.TrackException`. This behavior is controlled via the `TrackExceptionsAsExceptionTelemetry` property on the `ApplicationInsightsLoggerOptions` class. If you set `TrackExceptionsAsExceptionTelemetry` to `false` when configuring the Application Insights Logger, then the preceding example will not trigger the Snapshot Debugger. In this case, modify your code to call `TrackException` manually.
195193
196194
[!INCLUDE [azure-monitor-log-analytics-rebrand](../../../includes/azure-monitor-instrumentation-key-deprecation.md)]
197195

0 commit comments

Comments
 (0)