You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/application-insights/app-insights-snapshot-debugger.md
+50-6Lines changed: 50 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ The following environments are supported:
161
161
162
162
### Configure snapshot collection for other .NET applications
163
163
164
-
1. If your application is not already instrumented with Application Insights, get started by [enabling Application Insights and setting the instrumentation key](app-insights-windows-desktop.md).
164
+
1. If your application isn't already instrumented with Application Insights, get started by [enabling Application Insights and setting the instrumentation key](app-insights-windows-desktop.md).
165
165
166
166
2. Add the [Microsoft.ApplicationInsights.SnapshotCollector](http://www.nuget.org/packages/Microsoft.ApplicationInsights.SnapshotCollector) NuGet package in your app.
167
167
@@ -231,7 +231,7 @@ The Snapshot Collector is implemented as an [Application Insights Telemetry Proc
TheSnapshotCollectoralsomonitorsexceptionsastheyarethrownbysubscribingtothe [AppDomain.CurrentDomain.FirstChanceException](https://docs.microsoft.com/dotnet/api/system.appdomain.firstchanceexception) event. When that event fires, the Problem ID of the exception is computed and compared against the Problem IDs in the Collection Plan.
234
+
TheSnapshotCollectoralsomonitorsexceptionsasthey'rethrownbysubscribingtothe [AppDomain.CurrentDomain.FirstChanceException](https://docs.microsoft.com/dotnet/api/system.appdomain.firstchanceexception) event. When that event fires, the Problem ID of the exception is computed and compared against the Problem IDs in the Collection Plan.
235
235
Ifthere's a match, then a snapshot of the running process is created. The snapshot is assigned a unique identifier and the exception is stamped with that identifier. After the FirstChanceException handler returns, the thrown exception is processed as normal. Eventually, the exception reaches the TrackException method again where it, along with the snapshot identifier, is reported to Application Insights.
@@ -247,13 +247,14 @@ The main process continues to run and serve traffic to users with little interru
247
247
## Current limitations
248
248
249
249
### Publish symbols
250
-
TheSnapshotDebuggerrequiressymbolfilesontheproductionservertodecodevariablesandtoprovideadebuggingexperienceinVisualStudio. The 15.2 releaseofVisualStudio 2017 publishessymbolsforreleasebuildsbydefault when it publishes to App Service. In prior versions, you need to add the following line to your publish profile `.pubxml` file so that symbols are published in release mode:
Version 15.2 (orabove) ofVisualStudio 2017 publishessymbolsforreleasebuildsbydefault when it publishes to App Service. In prior versions, you need to add the following line to your publish profile `.pubxml` file so that symbols are published in release mode:
Forapplicationsthat_aren't_ hosted in App Service, the uploader logs are in the same folder as the minidumps: `%TEMP%\Dumps\<ikey>` (where `<ikey>` is your instrumentation key).
Iftheuploadercan't be launched, Snapshot Collector reports an `UploaderCannotStartFromShadowCopy` error. The body of the message often contains `System.UnauthorizedAccessException`. This error usually occurs because the application is running under an account with reduced permissions. The account has permission to write to the shadow copy folder, but it doesn'thavepermissiontoexecutecode.
417
+
418
+
Sincetheseerrorsusuallyhappenduringstartup, they'll usually be followed by an `ExceptionDuringConnect` error saying _"Uploader failed to start."_
Or, ifyou're using appsettings.json with a .NET Core application:
433
+
434
+
```json
435
+
{
436
+
"ApplicationInsights": {
437
+
"InstrumentationKey":"<your instrumentation key>"
438
+
},
439
+
"SnapshotCollectorConfiguration": {
440
+
"ShadowCopyFolder":"D:\\SnapshotUploader"
441
+
}
442
+
}
443
+
```
444
+
401
445
### Use Application Insights search to find exceptions with snapshots
402
446
403
447
Whenasnapshotiscreated, thethrowingexceptionistaggedwithasnapshotID. ThatsnapshotIDisincludedasacustomproperty when the exception telemetry is reported to Application Insights. Using **Search** in Application Insights, you can find all telemetry with the `ai.snapshot.id` custom property.
0 commit comments