Several App Services currently use APPINSIGHTS_INSTRUMENTATIONKEY. You plan to migrate to connection strings so you can target regional ingestion endpoints and support failover to a secondary Application Insights resource in another region without code redeploys. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Replace APPINSIGHTS_INSTRUMENTATIONKEY with APPLICATIONINSIGHTS_CONNECTION_STRING in App Settings using the primary resource’s connection string (which includes its regional ingestion endpoint). During failover, update this setting to the secondary resource’s connection string.
Why this is the answer
The correct approach is to replace APPINSIGHTSINSTRUMENTATIONKEY with APPLICATIONINSIGHTSCONNECTIONSTRING in your App Service settings. The connection string allows you to specify a regional ingestion endpoint, which is crucial for targeting specific regions and enabling failover. During a failover event, you would update this APPLICATIONINSIGHTSCONNECTIONSTRING setting to point to the connection string of your secondary Application Insights resource. This change in the application setting will direct telemetry to the new resource without requiring code redeployment. Keeping both settings is incorrect because APPLICATIONINSIGHTSCONNECTIONSTRING takes precedence over APPINSIGHTSINSTRUMENTATIONKEY when both are present, meaning telemetry would only go to the resource specified by the connection string. The global dc.services.visualstudio.com endpoint does not inherently provide regional failover capabilities as described for connection strings. Specifying two InstrumentationKey values in a single connection string is not a supported format for dual-write or failover.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed