You are developing a web application using ASP.NET Core 8.0 that will run on Azure App Service. The application is configured to send telemetry to an Azure Application Insights instance. You need to implement the Application Insights Snapshot Debugger to capture call stacks when unhandled exceptions occur, and ensure that developers can download and analyze these snapshots from the Azure portal.
Which of the following actions should you perform? (Select TWO.)
- Assign the developers to the Application Insights Snapshot Debugger role at the Application Insights resource scope.Answer
- Install the Microsoft.ApplicationInsights.SnapshotCollector NuGet package and register the collector in the application startup code.Answer
- CAssign the developers to the Monitoring Contributor role at the Application Insights resource scope.
- DScale the App Service plan to the Shared (D1) pricing tier to support diagnostic collection.
- EConfigure the legacy APPINSIGHTS_INSTRUMENTATIONKEY app setting in the App Service configuration to initialize the telemetry client.
Answer
To configure the Snapshot Debugger and enable developers to access it, you must install the Microsoft.ApplicationInsights.SnapshotCollector NuGet package and register the collector service in your startup code. Additionally, you must assign the developers to the Application Insights Snapshot Debugger role at the Application Insights resource scope.
To implement the Snapshot Debugger, the application code must include the Microsoft.ApplicationInsights.SnapshotCollector NuGet package and register the snapshot collector in startup. Additionally, to view the snapshots, users must be granted the Application Insights Snapshot Debugger role, as general contributor or reader roles do not have permission to view sensitive memory dumps.
Step-by-Step Solution
Key Concept
Configuring Application Insights Snapshot Debugger using code-based setup and RBAC roles.