Soru

Zorluk: OrtaImplement Application Insights Profiler, Snapshot Debugger, and Smart Detection

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.)

  1. Assign the developers to the Application Insights Snapshot Debugger role at the Application Insights resource scope.Cevap
  2. Install the Microsoft.ApplicationInsights.SnapshotCollector NuGet package and register the collector in the application startup code.Cevap
  3. C
    Assign the developers to the Monitoring Contributor role at the Application Insights resource scope.
  4. D
    Scale the App Service plan to the Shared (D1) pricing tier to support diagnostic collection.
  5. E
    Configure the legacy APPINSIGHTS_INSTRUMENTATIONKEY app setting in the App Service configuration to initialize the telemetry client.

Cevap

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.

Adım Adım Çözüm

1
Add code-level telemetry capture for exception snapshots.
Installed the Microsoft.ApplicationInsights.SnapshotCollector NuGet package and registered it in the dependency injection container using builder.Services.AddSnapshotCollector().
This allows the application to capture local memory dumps and call stacks when an unhandled exception is thrown.
2
Ensure the hosting environment supports the Diagnostic Snapshot Collector.
Configured the App Service plan to a tier of Basic or higher (such as Standard or Premium).
Snapshot Debugger has a minimum requirement of the Basic (B1) App Service plan tier to run.
3
Configure role-based access control (RBAC) for the developers.
Assigned the Application Insights Snapshot Debugger role to the developer accounts.
Snapshots can contain sensitive data from application memory. Standard monitoring roles like Reader or Monitoring Contributor do not grant permissions to download or view these snapshots.

Anahtar Kavram

Configuring Application Insights Snapshot Debugger using code-based setup and RBAC roles.
Bu soruyu puanla